Skip to content

Instantly share code, notes, and snippets.

@kishikawakatsumi
Created January 14, 2014 18:52
Show Gist options
  • Save kishikawakatsumi/8423638 to your computer and use it in GitHub Desktop.
Save kishikawakatsumi/8423638 to your computer and use it in GitHub Desktop.
One-line fix for UITextView on iOS 7
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"UIDisableLegacyTextView"];
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
@kishikawakatsumi
Copy link
Author

Probably this force to use _UICompatibilityTextView class instead UITextView.
_UICompatibilityTextView is the same as iOS 6's UITextView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment