Skip to content

Instantly share code, notes, and snippets.

//
// OCXML.swift
// Created by Marco Arment on 9/23/24.
//
// Released into the public domain. Do whatever you'd like with this.
// No guarantees that it'll do anything, or do it correctly. Good luck!
//
import Foundation
@ian-mcdowell
ian-mcdowell / DebuggingOverlay.m
Last active February 27, 2021 19:04
UIDebuggingInformationOverlay for iOS 10, 11, and 12
#import <objc/runtime.h>
@interface DebuggingOverlay: NSObject
@end
@implementation DebuggingOverlay
+ (void)toggleOverlay {
id debugInfoClass = NSClassFromString(@"UIDebuggingInformationOverlay");
@odrobnik
odrobnik / gist:2872435
Created June 5, 2012 03:25
Inner Shadow on Label
- (void)drawTextInRect:(CGRect)rect
{
[super drawTextInRect:rect];
CGContextRef ctx = UIGraphicsGetCurrentContext();
NSString *fontName = self.font.fontName;
CGFloat fontSize = self.font.pointSize;
CTFontRef font = CTFontCreateWithName((__bridge CFStringRef)fontName, fontSize, NULL);