随笔分类 -  ios

摘要:NSLog的格式如下所示:%@ 对象%d, %i 整数%u 无符整形%f 浮点/双字 %0.2f 只保留两位小数%x, %X 二进制整数%o 八进制整数%zu size_t%p 指针%e 浮点/双字 (科学计算)%g 浮点/双字%s C 字符串%.*s Pascal字符串%c 字符%C unichar%ld 长整形(long)%lld 64位长整数(long long)%llu 无符64位长整数%Lf 64位双字Bool 类型 %i Bool类型值默认为False,即0,为True时输出为1。 阅读全文
posted @ 2012-07-03 09:02 ValeTu 阅读(156) 评论(0) 推荐(0)
摘要:if([[UIApplication sharedApplication] respondsToSelector:@selector(terminateWithSuccess)]){ [[UIApplication sharedApplication] performSelector:@selector(terminateWithSuccess)]; }ps:私有api,上传会被拒。。。 阅读全文
posted @ 2012-07-03 08:57 ValeTu 阅读(236) 评论(0) 推荐(0)
摘要:in this post, we’ll discuss about the new File-Sharing and Document Support features in iPhone OS 3.2. The new File-Sharing feature allows user to access/Documentdirectory through iTunes. Users are able to move files from their computers to iPads or iPads to their computers by using this feature. Th 阅读全文
posted @ 2012-07-02 22:09 ValeTu 阅读(443) 评论(0) 推荐(0)
摘要:在应用程序的Info.plist文件中添加Application supports iTunes file sharing键,并将键值设置为YES 阅读全文
posted @ 2012-07-02 21:55 ValeTu 阅读(180) 评论(0) 推荐(0)
摘要:使用xcode4.2检测内存泄露leak的具体位置的两种方法总结博主:笑笑原文链接:http://blog.csdn.net/yanxiaoqing/article/details/7174750转载注明以上文字第一:出现内存泄露后如图1所示,点击view工具的第三个视图,显示左侧栏,即如图2所示:(图一)第二:双击泄露的黑色的表示泄露的代码,出现如图三所示(图二)第三:红色区域即是表示有泄露的object,添加代码: CFRelease(email); [personNamerelease];后,解决了泄露问题(图三)第二种方法:使用analyze,会自动分析出可能存在的内存泄露的地方,或者 阅读全文
posted @ 2012-07-02 20:33 ValeTu 阅读(267) 评论(0) 推荐(0)
摘要:NSDateFormatter格式化日期字符串,copy一份常用参数:a: AM/PM (上午/下午)A: 0~86399999 (一天的第A微秒)c/cc: 1~7 (一周的第一天, 周天为1)ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat (星期几简写)cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday (星期几全拼)d: 1~31 (月份的第几天, 带0)D: 1~366 (年份的第几天,带0)e: 1~7 (一周的第几天, 带0)E~EEE: Sun/Mon/Tue/Wed/Thu/Fri/Sa 阅读全文
posted @ 2012-07-02 20:24 ValeTu 阅读(252) 评论(0) 推荐(0)
摘要:原文链接地址:http://www.raywenderlich.com/2696/how-to-debug-memory-leaks-with-xcode-and-instruments-tutorial 免责申明(必读!):本博客提供的所有教程的翻译原稿均来自于互联网,仅供学习交流之用,切勿进行商业传播。同时,转载时不要移除本申明。如产生任何纠纷,均与本博客所有人、发表该翻译稿之人无任何关系。谢谢合作! 本文由yy翻译。Powered by YY!:)教程截图: 作为一名无证程序员,无论你多么精通Objective-C的内存管理,随着时间的推移,你也不可避免的犯内存相关的错误。但通常因... 阅读全文
posted @ 2012-07-01 11:52 ValeTu 阅读(147) 评论(0) 推荐(0)