Last active
January 13, 2016 05:14
-
-
Save zummenix/3da61e71df6e199099a2 to your computer and use it in GitHub Desktop.
This fixes crash related to UIStatusBar on iOS 7.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <objc/runtime.h> | |
+ (void)swizzletouchesEndedForUIStatusBar | |
{ | |
if (IS_OS_7_OR_LATER && !IS_OS_8_OR_LATER) { | |
Method original, swizzled; | |
original = class_getInstanceMethod(NSClassFromString(@"UIStatusBar"), @selector(touchesEnded:withEvent:)); | |
swizzled = class_getInstanceMethod(self, @selector(swizzled_touchesEnded:withEvent:)); | |
method_exchangeImplementations(original, swizzled); | |
} | |
} | |
- (void)swizzled_touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event | |
{ | |
} | |
// Call `swizzletouchesEndedForUIStatusBar` somewhere. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment