Skip to content

Instantly share code, notes, and snippets.

View iOSDev33's full-sized avatar

Christopher Coudriet iOSDev33

  • Crushed Box Software / Christopher Coudriet
  • Greater Philadelphia Area
View GitHub Profile
@iOSDev33
iOSDev33 / gist:3788403
Created September 26, 2012 14:34 — forked from spoletto/gist:3725118
iOS 6 Autorotation Swizzling
@implementation AppDelegate
void SwapMethodImplementations(Class cls, SEL left_sel, SEL right_sel) {
Method leftMethod = class_getInstanceMethod(cls, left_sel);
Method rightMethod = class_getInstanceMethod(cls, right_sel);
method_exchangeImplementations(leftMethod, rightMethod);
}
+ (void)initialize {
if (self == [AppDelegate class]) {
#ifdef __IPHONE_6_0