if(m_result==nil){ NSLog(@"KDA!");}还有就是,从网上找到了用法:if([m_result isEqual:[NSNUll null]]){ NSLog(@"KDA!");}
分类:
移动开发 时间:
2015-10-14 15:50:01
阅读次数:
253
//手机序列号 NSString* identifierNumber = [[UIDevice currentDevice] uniqueIdentifier]; NSLog(@"手机序列号: %@",identifierNumber); //手机别名: 用户定义的名称 NS...
分类:
移动开发 时间:
2015-10-13 13:40:51
阅读次数:
140
NSLog的定义 void NSLog(NSString *format, …); 基本上,NSLog很像printf,同样会在console中输出显示结果。不同的是,传递进去的格式化字符是NSString的对象,而不是char *这种字符串指针。实例 NSLog可以如下面的方法使用: NS...
分类:
其他好文 时间:
2015-10-12 12:20:46
阅读次数:
89
添加本地推送///本地添加 -(void)addLocalPushNotification:(UIButton*)sender;{NSLog(@"%s",__FUNCTION__);UILocalNotification*localNotification=[[UILocalNotification...
分类:
移动开发 时间:
2015-10-11 22:58:40
阅读次数:
430
说明、代码片段就是方便快捷输入的片段,类似do -while、switch等这些系统语句,这些系统的语句也是代码片段,快速输入一些常用的代码语句,就可以把这些语句写成代码片段!Example: 我们编程的时候经常需要用到打印一些元素,我们就可以把打印NSLog做成一个代码片段。 1、先输入打印的代码...
分类:
移动开发 时间:
2015-10-11 21:09:00
阅读次数:
196
(1)最基础的用法案例,我们可以把block理解为一段类似变量一样的可执行函数代码片段: void(^printBlock)(NSString*x); printBlock=^(NSString*str) { NSLog(@"print:%@",str); };...
分类:
其他好文 时间:
2015-10-11 18:12:51
阅读次数:
194
// Person.m 文件@implementation Person- (void)newsCome:(NSNotification *)note{ Company *obj = note.object; NSLog(@"\n公司名: %@ -- 新闻名: %@ -- 接收者: %@ -- .....
分类:
移动开发 时间:
2015-10-10 22:58:27
阅读次数:
204
获取主要目录路径的方式沙盒目录NSLog(@"%@",NSHomeDirectory());MyApp.appNSLog(@"%@",[[NSBundle mainBundle] bundlePath]);tmpNSLog(@"%@",NSTemporaryDirectory());Document...
分类:
移动开发 时间:
2015-10-10 17:17:16
阅读次数:
154
寻找沙盒路径方法:(网上帖子的方法不行,可以尝试第一种)1.直接打印NSHomeDirectory() 即 NSLog(@"%@", NSHomeDirectory());对于NSHomeDirectory()官方的描述是:对于mac打印出来后就会得到沙盒的路径,例如我得到的打印结果是:/User....
分类:
移动开发 时间:
2015-10-09 21:24:52
阅读次数:
255
1 //处理位置坐标更新 2 - (void)didUpdateBMKUserLocation:(BMKUserLocation *)userLocation 3 { 4 NSLog(@"didUpdateUserLocation lat %f,long %f",userLocation....
分类:
其他好文 时间:
2015-10-09 13:57:20
阅读次数:
106