摘要:
UIImage+Screenshot.h#import @interface UIImage (Screenshot)+ (UIImage *)screenshot;@end#import "UIImage+Screenshot.h"@implementation UIImage (Screensh... 阅读全文
摘要:
UIViewController *viewController = [[UIViewController alloc]init];UIViewController* controller = self.view.window.rootViewController;viewController.vi... 阅读全文
摘要:
[_yourTextField addTarget:self action:@selector(eventEditingChange:) forControlEvents:UIControlEventEditingChanged];-(void)eventEditingChange:(UITextF... 阅读全文
摘要:
//还可以输入的长度。- (void)textViewDidChange:(UITextView *)textView{ UITextRange *markRange = textView.markedTextRange; int pos = [textView offsetFromPo... 阅读全文
摘要:
#import #import typedef void (^block)(void);@interface FunctionRunTime : NSObject+ (CGFloat)runTimeBlock:(block)block;@end#import "FunctionRunTime.h"@... 阅读全文
摘要:
1. @interface里: CLLocationManager *locationManager;2. 初始化: locationManager = [[CLLocationManager alloc] init];3. 调用请求: [locationManager reque... 阅读全文
摘要:
UIScrollView中添加了一个手势 UITapGestureRecognizer *_tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(foregroundTapped:)]... 阅读全文
摘要:
自定义一个View DrawLineDrawLine.h#import @protocol gridTouchDelete - (void)gridTouchColumn:(NSInteger)column touchRow:(NSInteger)row;@end@interface DrawLin... 阅读全文
摘要:
UIApplication *app = [UIApplication sharedApplication]; [app performSelector:@selector(suspend)]; //wait 2 seconds while app is going background [NST... 阅读全文
摘要:
UILabel *badge = (UILabel *)[self.view viewWithTag:10000]; 阅读全文