码迷,mamicode.com
首页 >  
搜索关键字:pch nslog    ( 1866个结果
ios显示手机信息
NSString *strname=[[UIDevice currentDevice] name]; NSLog(@"设备名:%@",strname); NSString *strSysName = [[UIDevice currentDevice] systemName]; NSLog...
分类:移动开发   时间:2014-12-19 23:18:17    阅读次数:178
objective-c获取自1970年以来的毫秒数
NSTimeIntervaltime=[[NSDatedate]timeIntervalSince1970]*1000;doublei=time;//NSTimeInterval返回的是double类型NSLog(@"1970timeInterval:%f",i);
分类:其他好文   时间:2014-12-19 23:17:39    阅读次数:186
iOS 获取设备系统信息
iOS 获取设备系统信息     UIDevice *device_=[[UIDevice alloc] init];     NSLog(@"设备所有者的名称--%@",device_.name);     NSLog(@"设备的类别-----%@",device_.model);     NSLog(@"设备的的本地化版本-%@",device_.localiz...
分类:移动开发   时间:2014-12-19 12:14:53    阅读次数:179
NSArray 介绍
NSArray*array=[NSArrayarrayWithObjects:@"1",@"2",@"3",nil];[arrayenumerateObjectsUsingBlock:^(idobj,NSUIntegeridx,BOOL*stop){NSLog(@"%zi->%@",idx,obj);}];NSMutableString*string1=[NSMutableStringstringWithString:@"A"];NSMutableString*string2=[NSMutableStr..
分类:其他好文   时间:2014-12-18 19:11:17    阅读次数:131
oc goto语法
//这一句写不写都可以,写的话一个警告,如果下面语句报错,就写上这一句 //    struct label *jumpTo;     for (int i=0; i10; i++) {         NSLog(@"0000====%d",i);         if (i==5) {             goto jumpTo;         }         NSLo...
分类:其他好文   时间:2014-12-17 18:29:42    阅读次数:186
iOS8 关于预编译文件.pch的改变
ios8 添加。pch文件1, 新建文件 (command+N)选择other组,选择pch,输入文件名保存。 eg: 创建的工程为Demo; 创建文件名为DemoPrefixHeader.pch2,到工程里面的build setting ->apple llvm 6.0 - language ->...
分类:移动开发   时间:2014-12-17 18:04:34    阅读次数:143
NSInteger打印以及字符串的转换
1 You can also use %zd (NSInteger) and %tu (NSUInteger) when logging to the console.2 3 NSInteger integer = 1;4 NSLog(@"first number: %zd", integer);5...
分类:其他好文   时间:2014-12-17 14:26:41    阅读次数:631
Objective-C语言-description方法和sel-BOLCK和协议
一、description方法Description方法包括类方法和对象方法。(NSObject类所包含)(一)基本知识-description(对象方法)使用NSLog和@%输出某个对象时,会调用对象的description方法,并拿到返回值进行输出。+description(类方法)使用NSLo...
分类:编程语言   时间:2014-12-17 10:34:27    阅读次数:151
block练习题
//统计字符串字符个数 NSString *str=@"*******";         NSLog(@"str 的长度为: %i",(int)[str length]);     //判断用户名与密码是否相同,如果相同,输出right #import    @interface UserService : NSObject   -(void)sayHello:(NSStri...
分类:其他好文   时间:2014-12-17 00:19:22    阅读次数:232
IOS GCD之Block
GCD延迟执行#pragmamark-GCD延迟 /** *dispatch_after */ -(void)gcdDelay { NSLog(@"开始时间。。。。。。。%@",[NSDatedate]); doubledelaySecond=2.0; dispatch_time_tdelayInNanoSeconds=dispatch_time(DISPATCH_TIME_NOW,delaySecond*NSEC_PER_SEC); //得到当前的全局队列..
分类:移动开发   时间:2014-12-16 19:31:35    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!