This file contains hidden or 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
| [[UIControl new] sendAction:@selector(suspend) | |
| to:[UIApplication sharedApplication] | |
| forEvent:nil]; |
This file contains hidden or 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
| - (NSString*)deviceString | |
| { | |
| // 需要#include <sys/utsname.h> | |
| struct utsname systemInfo; | |
| uname(&systemInfo); | |
| NSString *deviceString = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; | |
| if ([deviceString isEqualToString:@"iPhone1,1"]) return @"iPhone 1G"; | |
| if ([deviceString isEqualToString:@"iPhone1,2"]) return @"iPhone 3G"; | |
| if ([deviceString isEqualToString:@"iPhone2,1"]) return @"iPhone 3GS"; |
This file contains hidden or 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
| [_textField addTarget:self | |
| action:@selector(textFieldEditingChangedAction:) | |
| forControlEvents:UIControlEventEditingChanged]; | |
| //实时查看内容 限定字符 | |
| - (void)textFieldEditingChangedAction:(UITextField *)textField { | |
| NSString *toBeString = textField.text; | |
| if ([textField.textInputMode.primaryLanguage isEqualToString:@"zh-Hans"]) { // 简体中文输入,包括简体拼音,健体五笔,简体手写 | |
| UITextRange *selectedRange = [textField markedTextRange]; | |
| //获取高亮部分 |
This file contains hidden or 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 <AppKit/AppKit.h> | |
| __attribute((constructor)) void Patch_10_10_2_entry() | |
| { | |
| NSLog(@"10.10.2 patch loaded"); | |
| } | |
| @interface NSTouch () | |
| - (id)_initWithPreviousTouch:(NSTouch *)touch newPhase:(NSTouchPhase)phase position:(CGPoint)position isResting:(BOOL)isResting force:(double)force; | |
| @end |