上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: OC中使用: NSArray * lists = [NSArray array]; [lists enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { }]; Swift中使用: f 阅读全文
posted @ 2016-08-26 14:19 J-Vijay 阅读(351) 评论(0) 推荐(0)
摘要: 其实看完上面的叙述,你会思考,到底什么情况下,一个UIView需要只设置坐标不设置大小呢?其实这种场景相当普遍。比如,我们常常会碰到,一个View中有两个Label,两个Label的高度均和内容有关,这时候,你的View的高度就必须由两个Label的高度有关,而不能一开始就定死。例如。一个已知宽度的 阅读全文
posted @ 2016-08-26 10:50 J-Vijay 阅读(3185) 评论(0) 推荐(0)
摘要: 1.简介 NSOperation实例封装了需要执行的操作和执行操作所需的数据,并且能够以并发或非并发的方式执行这个操作。 NSOperation本身是抽象基类,因此必须使用它的子类,使用NSOperation子类的方式有2种: 1> Foundation框架提供了两个具体子类直接供我们使用:NSIn 阅读全文
posted @ 2016-08-26 10:06 J-Vijay 阅读(140) 评论(0) 推荐(0)
摘要: 1、简介: 1.1 iOS有三种多线程编程的技术,分别是: 1.、NSThread 2、Cocoa NSOperation (iOS多线程编程之NSOperation和NSOperationQueue的使用) 3、GCD 全称:Grand Central Dispatch( iOS多线程编程之Gra 阅读全文
posted @ 2016-08-26 10:05 J-Vijay 阅读(398) 评论(0) 推荐(0)
摘要: - (void)viewDidLoad { [super viewDidLoad]; // gcd 可以充分调用设备的 cpu 发挥最大性能,在 C 语言基础之上封装的 // dispatch_queue_t开辟一个线程 // DISPATCH_QUEUE_PRIORITY_DEFAULT设置优先级 dispatch_queue_t... 阅读全文
posted @ 2016-08-26 10:04 J-Vijay 阅读(296) 评论(0) 推荐(0)
摘要: /* 本地通知:不通过网络,在本地实现的通知,自己发给自己 远程通知:必须通过网络,使用推送技术(APNs),实现通知 本地通知: 1.要完成可以接收的通知形式的注册 2.具体通知的设置 3.发送通知 */ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NS... 阅读全文
posted @ 2016-08-26 10:02 J-Vijay 阅读(175) 评论(0) 推荐(0)
摘要: 指定定义的key的类型 <optional>表示字段可选,例如 //链接字段是可选的,转换的时候允许link未空 @property (nonatomic,strong) NSString</optional><optional> *link; <index>表示索引,参照1 <convertond 阅读全文
posted @ 2016-08-26 09:59 J-Vijay 阅读(367) 评论(0) 推荐(0)
摘要: [self.mapView deselectAnnotation:view.annotation animated:YES]; 阅读全文
posted @ 2016-08-26 09:58 J-Vijay 阅读(549) 评论(0) 推荐(0)
摘要: for (UIViewController *VC in self.navigationController.viewControllers) { if ([VC isKindOfClass:[CarInfoViewController class]]) { [self.navigationController popToViewC... 阅读全文
posted @ 2016-08-26 09:57 J-Vijay 阅读(342) 评论(0) 推荐(0)
摘要: -(id)initWithDic:(NSDictionary *)dic { if (self = [super init]) { [self setValuesForKeysWithDictionary:dic]; } return self; } -(void)setValue:(id)valu 阅读全文
posted @ 2016-08-26 09:55 J-Vijay 阅读(1032) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页