上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: 在请求服务器时,如果参数中带有中文字符。就会报参数格式错误,需要将其转换成UTF8@interface NSString (NSURLUtilities)/* Adds all percent escapes necessary to convert the receiver into a legal URL string. Uses the given encoding to determine the correct percent escapes (returning nil if the given encoding cannot encode a particular charact 阅读全文
posted @ 2013-09-17 17:38 superchao 阅读(1101) 评论(0) 推荐(0) 编辑
摘要: From:http://blog.csdn.net/naruto_ku/article/details/8779203在进行iOS开发时,偶尔会碰到libc++abi.dylib handler threw exception,这种错误,而且这种错误也不打印任何相关的信息。可以使用@try{ } @catch(NSException *exception) { } @finally { } 将有问题的代码放到try块中,然后就可以在catch块里打印出出错信息,调试起来很方便。这种机制在iOS的体系架构中效率比较低,所以不建议放到产品代码中,只适合用来调试。 阅读全文
posted @ 2013-09-16 14:27 superchao 阅读(242) 评论(0) 推荐(0) 编辑
摘要: NSInteger NSStringNSString *inStr = [NSString stringWithFormat:@"%d", (int)month];NSInteger = [NSStringintValue];NSData-->NSMutableDataNSData *_data = [[NSData alloc] init];NSMutableData *_mdata = [NSMutableData dataWithData:_data];[_data release];NSstring --> NSdataNSString *aString 阅读全文
posted @ 2013-08-15 14:11 superchao 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 不想格式化,安装Paragon NTFS 10.0.2from:http://www.nowmac.com/support/mac/664.html就可以解决 阅读全文
posted @ 2013-08-08 11:30 superchao 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 遇到这个错误,首先不要急。按照如下方法即可(如果你的svn地址没有问题的话):url要使用域名,所以映射下1.修改host:在应用程序里面打开终端(terminal),输入sudo vi /etc/hosts然后提示输入系统密码hosts文件就自动打开了接着输入 e不是i,进入编辑模式将添加的网站ip拷贝进去 例如: 132.99.189.45 XXXSvn编辑完成之后,按esc,输入 : wq这样就更改完成了.或是:*推荐(此方法经本人试验非常好用) 打开终端,输入 sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/h. 阅读全文
posted @ 2013-08-06 17:33 superchao 阅读(287) 评论(0) 推荐(0) 编辑
摘要: NSDateFormatter *inputDateFormatter = [[NSDateFormatter alloc] init]; NSString *inputDateStr = @"yyyy/MM/dd HH:mm:ss"; [inputDateFormatter setDateFormat:inputDateStr]; NSString *intputDateStr = @"2000/01/02 03:04:05"; NSDate *inputDate = [inputDateFormatter dateFromString:intputD 阅读全文
posted @ 2013-08-02 16:51 superchao 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1. 建立一个C++类2. 写一个Adaptor的Objective-C类3. 在其他Objective-C的逻辑中调用Adaptor类。1.C++类//// CPlusPlusClass.h// OBJ_C++//// Created by Txtw on 13-7-2.// Copyright (c) 2013年 Txtw. All rights reserved.//#ifndef __OBJ_C____CPlusPlusClass__#define __OBJ_C____CPlusPlusClass__#include class CPlusPlusClass {public:... 阅读全文
posted @ 2013-07-02 12:01 superchao 阅读(934) 评论(0) 推荐(0) 编辑
摘要: 今天更新项目时,出现Apps are note permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice.如下图:利用下面命令搜索项目,原来真是百度地图的问题。find . | grep -v .svn| grep "\.a"| grep -v "\.app"| xargs grep uniqueIdentifier如果出现:-bash: find: command not found-bash: xargs: command not fou 阅读全文
posted @ 2013-06-26 09:54 superchao 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 合并.a文件,制作通用静态库这二个库一个是用于真机运行的一个是用于模拟器运行的.其实我们可以利用lipo将这二个文件打包成一个通用的a文件。命令如下:将/Users/user/Library/Developer/Xcode/DerivedData/UITab-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products替换成你的路径。将/Users/user/Desktop/libPrint.a替换成合并后的路径。lipo -create /Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluum 阅读全文
posted @ 2013-06-19 15:43 superchao 阅读(144) 评论(0) 推荐(0) 编辑
摘要: For some reason the (possibly when adding multiple icons and changing the file?) the item gets moved toitem 1-...Make sure your icon is listed asitem 0in theplisthttp://stackoverflow.com/questions/4627697/problem-with-icon-png-icon-specified-in-the-info-plist-not-found-under-the-top 阅读全文
posted @ 2013-06-19 15:05 superchao 阅读(372) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页