随笔分类 -  ios开发

XCode archive后没有submit按钮选项
摘要:引起原因:由于工程中含有sub project,而sub project中有private 或 public 的文件导致的。只有两个选项:解决办法: Your PROJECT - Skip Install - set to NO Your libraries - Skip Install - set to YES In your SUBproject you should check "Copy headers" sectionclick on SUB projectBuilding PhasesDRAG all files fron Public and Private 阅读全文

posted @ 2013-04-01 19:52 Crazy_程序猿 阅读(277) 评论(0) 推荐(0)

CCLabelTTF : will become a white rectangle
摘要:If you want invoke cocos2d-x function from a thread,It may be Crash.I am working on a network game using cocos2dx with libcurl.I created a CCLabelTTF on a CCLayer object.Then I made a thread to request my java server using curl.when a get response from the thread, I want to print a string on the CCL 阅读全文

posted @ 2013-03-22 09:52 Crazy_程序猿 阅读(171) 评论(0) 推荐(0)

duplicate symbol _SBJSONErrorDomain in:
摘要:If your iOS project use external static library, sooner or later you will encounter errors like this:ld: duplicate symbol _SBJSONErrorDomain in ...This happens when you use library A and library B, each use the same third party library such as SBJson.One usual way to fix this is rename the conflicti 阅读全文

posted @ 2013-02-25 14:52 Crazy_程序猿 阅读(362) 评论(0) 推荐(0)

cocos2d-x在ios平台获取当前设备的语言种类
摘要:1typedefenumLanguageType2{3kLanguageEnglish=0,4kLanguageChinese,5kLanguageFrench,6kLanguageItalian,7kLanguageGerman,8kLanguageSpanish,9kLanguageRussian10}ccLanguageType;1112131415ccLanguageTypeCCApplication::getCurrentLanguage()16{17//getthecurrentlanguageandcountryconfig18NSUserDefaults*defaults=[N 阅读全文

posted @ 2013-02-17 10:49 Crazy_程序猿 阅读(597) 评论(0) 推荐(0)

怎样在.cpp中使用.m 或者.mm文件
摘要:新建一个.mm文件在文件中定义成C++的类在.h文件中: 声明1classOCBridge{2public:3staticvoidshowSomeThing();4}在.mm文件中:1voidOCBridge::showSomeThing(){2//TODO3}然后就可以在.cpp中使用oc里面的类或者方法了。 阅读全文

posted @ 2013-01-10 09:52 Crazy_程序猿 阅读(403) 评论(0) 推荐(0)

通过源码获取iphone硬件版本以及系统信息
摘要:获取iphone的系统信息使用[UIDevice currentDevice],信息如下:[[UIDevicecurrentDevice]systemName]:系统名称,如iPhoneOS[[UIDevicecurrentDevice]systemVersion]:系统版本,如4.2.1[[UIDevicecurrentDevice]model]:Themodelofthedevice,如iPhone或者iPodtouch[[UIDevicecurrentDevice]uniqueIdentifier]:设备的惟一标识号,deviceID[[UIDevicecurrentDevice]nam 阅读全文

posted @ 2012-12-28 16:35 Crazy_程序猿 阅读(342) 评论(0) 推荐(0)

导航