摘要: 1.使用序列化需要在对象中实现NSCoding协议NSCoding协议方法:encodeWithCoder和initWithCoder,将一个对象序列化需要实现这2个方法。@protocol NSCoding- (void)encodeWithCoder:(NSCoder *)aCoder;-(vo... 阅读全文
posted @ 2015-08-10 21:21 一只简单的码农 阅读(159) 评论(0) 推荐(0) 编辑
摘要: @interface ViewController ()#define FileName @"Student.plist"#define KName @"KName"#define KBirth @"KBirth"#define KSex @"KSex"#define KNumber @"KNumb... 阅读全文
posted @ 2015-08-09 23:10 一只简单的码农 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 1.每个应用程序都有自己的存储空间。2.应用程序不能访问其他程序的存储空间。3.应用程序请求的数据都要通过权限检测,不符合条件的不被允许。默认,沙盒有3个目录:Documents:应用程序将其数据存储在documents中。Library:基于NSUserDefaults的首选项设置存储在Libra... 阅读全文
posted @ 2015-08-09 21:43 一只简单的码农 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1.Push跳转- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellKey=@"cellKey... 阅读全文
posted @ 2015-08-06 20:54 一只简单的码农 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 重载函数:-(NSArray *) sectionIndexTitlesForTableView: (UITableView *) tableView{ //dict allKeys取出的key arr无顺序,需进行排序 NSArray *arr = [[self.words allKeys] ... 阅读全文
posted @ 2015-08-05 21:33 一只简单的码农 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 1.代理 UITableViewDelegate,UITableViewDataSource2.实现代理- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ return 1; //分区数,默认为1}- (NSI... 阅读全文
posted @ 2015-08-05 20:34 一只简单的码农 阅读(125) 评论(0) 推荐(0) 编辑
摘要: UIDatePicker属性:Mode:Date and TimeLocale:Interval:最大值,最小值 NSDate *date=[self.dataPicker date]; NSDateFormatter *formatter=[[NSDateFormatter alloc... 阅读全文
posted @ 2015-08-03 22:20 一只简单的码农 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.组成最下层是:tabbar 中间是:custom content 最上面:Tab bar controller viewTab Bar上面显示的每一个Tab都对应着一个View Controller.ViewController本身具有一个tabBarItem属性,只要设置它,就能改变Tab B... 阅读全文
posted @ 2015-08-03 16:29 一只简单的码农 阅读(132) 评论(0) 推荐(0) 编辑
摘要: [UIView beginAnimations:@"trun" context:nil];//开始一个动画 [UIView setAnimationDuration:1]; //动画的时间 [UIView setAnimationCurve:U... 阅读全文
posted @ 2015-08-01 23:04 一只简单的码农 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1.delegate传值,传事件。1、避免子类化带来的过多的子类以及子类与父类的耦合2、通过委托传递消息机制实现分层解耦eg.代理#import @class Children; @protocol ChildrenDelegate @required- (void)Eat:(Children *... 阅读全文
posted @ 2015-08-01 15:46 一只简单的码农 阅读(197) 评论(0) 推荐(0) 编辑