摘要: 1 - (void)creatPlistFile{ 2 NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES); 3 NSString *path = [array objectAtIndex:0];// 拼接pho... 阅读全文
posted @ 2015-08-10 22:23 凝月霜雪 阅读(168) 评论(0) 推荐(0) 编辑
摘要: UIWindow继承自UIView// 初始化一个窗口,该窗口不带状态栏self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].applicationFrame];//初始化一个窗口,该窗口带状态栏self.window ... 阅读全文
posted @ 2015-08-09 21:31 凝月霜雪 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 主要代码: 1 先设置一个定时器 2 TimeInterval:设置时间间隔 3 target:表示发送的对象 4 selector:选择一个实例方法 5 userInfo:此参数可以为nil,当定时器失效时,由你指定的对象保留和释放该定时器 6 7 [NSTimer scheduledTimer... 阅读全文
posted @ 2015-07-20 21:32 凝月霜雪 阅读(447) 评论(0) 推荐(0) 编辑
摘要: KVC(KeyValueCoding) “键-值-编码”是一种可以直接通过字符串的名字(key)来访问类实例变量的机制。KVC可以用来访问和设置实例变量的值。设置方式:[self setValue:aName forKey:@"name"] [self setValue:aName forK... 阅读全文
posted @ 2015-07-20 20:08 凝月霜雪 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 如果学生没有来上课,老师给家长发送通知 1 #import "Parents.h" 2 // #import "Teacher.h" 3 @implementation Parents 4 5 - (instancetype)init 6 { 7 self = [super init]... 阅读全文
posted @ 2015-07-20 19:29 凝月霜雪 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 1 int main(int argc, const char * argv[]) { 2 @autoreleasepool { 3 4 5 //复制文件 6 7 8 //找到原来的文件... 阅读全文
posted @ 2015-07-15 21:46 凝月霜雪 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1》stuID一样时添加失败2》根据stuID修改联系人姓名、手机号3》根据姓名删除联系人 1 int main(int argc, const char * argv[]) { 2 @autoreleasepool { 3 4 ManagerPhone *... 阅读全文
posted @ 2015-07-15 15:29 凝月霜雪 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1 NSString *filePath = @"/Users/scjy/hello/iphone.txt"; 2 3 NSFileHandle *handle=[NSFileHandle fileHandleForUpdatingAtPath:filePath]... 阅读全文
posted @ 2015-07-14 12:25 凝月霜雪 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 1 //创建NSDate实例,返回GMT时间 2 NSDate *date1=[NSDate date]; 3 NSLog(@"%@",date1); 4 5 //返回date1保存的时间与date2的时间间隔 6 ... 阅读全文
posted @ 2015-07-14 10:04 凝月霜雪 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 1 /**************** NSDictionary *****************/ 2 3 //创建一个新的字典 4 NSDictionary *dictionary1=[NSDictionary dictionary]; 5 ... 阅读全文
posted @ 2015-07-14 10:02 凝月霜雪 阅读(138) 评论(0) 推荐(0) 编辑