一、 获取设备型号的方法主要有三种:///===== 设备型号:方法一 ========NSString * strModel = [UIDevice currentDevice].model;NSLog(@"model:%@",strModel);NSLog(@"localizedModel: ....
分类:
移动开发 时间:
2015-02-12 16:08:23
阅读次数:
129
//创建一个带多个参数的 NSSet *set=[NSSet setWithObjects:@"hello",@"hai", nil]; /* 所有 [set allObjects]; 随机一个 [set anyObject]; */ NSLog(@"set===%@",[set all...
分类:
其他好文 时间:
2015-02-11 10:42:47
阅读次数:
122
1. 传统编程// Person的方法- (void)eat{ NSLog(@"吃饭");}- (void)learn{ NSLog(@"学习");}- (void)play{ NSLog(@"娱乐");}// 连续做事情Person *p = [ [Person alloc] init ];...
分类:
移动开发 时间:
2015-02-10 20:16:21
阅读次数:
163
1.新建一个pch文件command + N , 选择 iOS -> Other -> PCHFile2.将building setting中的precompile header选项的路径添加“$(SRCROOT)/项目名称/pch文件名”(例如:$(SRCROOT)/RMWeibo/PrefixH...
分类:
其他好文 时间:
2015-02-09 22:53:13
阅读次数:
102
一直在用xcode6开发,但项目都是在xcode5上创建的,所以一直没注意到,xcode6竟然干掉pch文件了。为什么xcode6没有自动创建pch文件呢?简单地看:我们在写项目的时候,大部分宏定义,头文件导入都在这里,Xcode6去掉Precompile Prefix Header的主要原因可能在...
分类:
其他好文 时间:
2015-02-07 00:27:27
阅读次数:
130
[self AAAA:^(BOOL isSuccessed, id userInfo, NSString *errorMsg) { NSLog(@"AAAA: %d, userInfo: %@ errorMsg: %@", isSuccessed, userInfo, errorMsg);}];.....
分类:
其他好文 时间:
2015-02-05 21:49:25
阅读次数:
164
我的OC学习阶段中 我的第一个字典创建/*NSDictionary *dic = [NSDictionary dictionaryWithObject:@"xiaochen" forKey:@"name"] ;NSLog(@"%@", dic);*/ 虽然说我不是专业学习软件编程的,但是我很喜欢编....
分类:
其他好文 时间:
2015-02-05 17:50:51
阅读次数:
122
github: https://github.com/hellovoidworld/HVWWeiboA.封装授权业务1.把app的授权信息移动到HVWWeibo-Prefix.pch中作为公共宏1 // 授权信息2 #define HVWAppKey @"3942775926";3 #define ...
分类:
移动开发 时间:
2015-02-05 17:50:49
阅读次数:
171
1,测试一for(int i=0;i<1000000000;i++) { NSLog(@"i = %d",i);}2,测试二for(int i=0;i<1000000000;i++) { NSLog(@"i = %d",i); NSString *str =...
分类:
移动开发 时间:
2015-02-04 07:03:52
阅读次数:
167
一、description方法Description方法包括类方法和对象方法。(NSObject类所包含)(一)基本知识-description(对象方法)使用NSLog和@%输出某个对象时,会调用对象的description方法,并拿到返回值进行输出。+description(类方法)使用NSLo...
分类:
编程语言 时间:
2015-02-02 17:21:39
阅读次数:
181