http://www.cnblogs.com/ios-wmm/p/3299695.html iOS沙盒路径的查看和使用 NSString *path = NSHomeDirectory();//主目录 NSLog(@"NSHomeDirectory:%@",path); NSString *user
分类:
移动开发 时间:
2016-02-23 12:55:05
阅读次数:
180
1 //开始触摸 2 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 3 { 4 NSLog(@"你触摸了屏幕"); 5 } 6 //移动 7 - (void)touchesMoved:(NSSet *)touches
分类:
移动开发 时间:
2016-02-22 17:05:48
阅读次数:
147
NSString字符串的内容定义以后是不能修改的,是不可变的。 字符串的创建 //1.快速创建 NSString *str1=@"这是一个字符串!"; NSLog(@"str1=%@",str1); //2.alloc创建的字符串//以被1所替代 NSString *str2=[[NSString
分类:
其他好文 时间:
2016-02-17 12:32:58
阅读次数:
127
let oldArray = [1,2,3,4,5,6,7,8,9,10] let newArray = oldArray.filter({$0 >= 4}) NSLog("%@", newArray) 闭合和半闭合区间 for index in 1...5 { NSLog("------%d",
分类:
编程语言 时间:
2016-02-15 18:15:01
阅读次数:
207
uiwebview加载中文URL _paperGamePath = [_paperGamePath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSLog(@"paper game path is: %@", _p
分类:
Web程序 时间:
2016-02-14 16:54:26
阅读次数:
152
获取当前时间 NSDate *now = [NSDate date]; NSLog(@”now date is: %@”, now); NSCalendar *calendar = [NSCalendar currentCalendar]; NSUInteger unitFlags = NSYear
分类:
移动开发 时间:
2016-02-11 20:24:06
阅读次数:
285
题5:用于翻转从终端输入数的各个位。然后修改这个程序,以便正确的输入负数。 code: 1 int num_5 = 0,result_5 = 0; 2 3 NSLog(@"input num_5:"); 4 scanf("%i",&num_5); 5 6 if (num_5 < 0)//判断是否负数
分类:
其他好文 时间:
2016-02-02 14:32:33
阅读次数:
144
//if 语句int score = 70;if (score < 20) { NSLog(@"不及格");}else if(score >= 60){ NSLog(@"及格");}//if语句 判断条件存在多个情况下,判断一个年是否为润年int year;printf("请输入一个年份:");sc
分类:
其他好文 时间:
2016-02-01 14:38:34
阅读次数:
138
- (void)download:(NSString *)url{ NSLog(@"下载东西---%@---%@", url, [NSThread currentThread]);} /** * 创建线程的方式3种 */ - (void)createThread { 1、 NSThread *thr
分类:
编程语言 时间:
2016-02-01 02:00:33
阅读次数:
165
在release版本禁止输出NSLog内容 因为NSLog的输出还是比较消耗系统资源的,而且输出的数据也可能会暴露出App里的保密数据,所以发布正式版时需要把这些输出全部屏蔽掉。 我们可以在发布版本前先把所有NSLog语句注释掉,等以后要调试时,再取消这些注释,这实在是一件无趣而耗时的事!还好,还有
分类:
其他好文 时间:
2016-01-30 13:56:11
阅读次数:
125