摘要: // // XMGContact.m // 小码哥通讯录 #import "XMGContact.h" @implementation XMGContact static NSString *nameKey = @"name"; static NSString *phoneKey = @"phone"; - (void)encodeWithCoder:(NSCoder *)aCo... 阅读全文
posted @ 2017-03-31 14:55 laugh 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 自定义归档 阅读全文
posted @ 2017-03-31 14:42 laugh 阅读(207) 评论(0) 推荐(0) 编辑
摘要: // // XMGAddViewController.h // 小码哥通讯录 #import @class XMGContactViewController,XMGContact; // 利用block传值,需要把什么传递出去,就作为block参数,通常不需要返回值 typedef void(^XMGAddViewControllerBlock)(XMGContact *cont... 阅读全文
posted @ 2017-03-31 10:16 laugh 阅读(178) 评论(0) 推荐(0) 编辑
摘要: // // ViewController.m // 03-Block #import "ViewController.h" // name:Block类型别名 typedef void(^MyBlock)(int a); @interface ViewController () @property (nonatomic, weak) MyBlock myBlock1; @end @... 阅读全文
posted @ 2017-03-31 10:09 laugh 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 小码哥通讯录(保存功能) 阅读全文
posted @ 2017-03-31 09:52 laugh 阅读(323) 评论(0) 推荐(0) 编辑