2013年4月1日

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)

2013年3月22日

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)

2013年2月25日

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)

2013年2月17日

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)

2013年1月10日

怎样在.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)

2012年12月28日

通过源码获取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)

2012年12月21日

c++中的引用与指针

摘要: ★ 相同点:1. 都是地址的概念;指针指向一块内存,它的内容是所指内存的地址;引用是某块内存的别名。★ 区别:1. 指针是一个实体,而引用仅是个别名;2. 引用使用时无需解引用(*),指针需要解引用;3. 引用只能在定义时被初始化一次,之后不可变;指针可变;引用“从一而终” ^_^4. 引用没有 const,指针有 const,const 的指针不可变;5. 引用不能为空,指针可以为空;6. “sizeof 引用”得到的是所指向的变量(对象)的大小,而“sizeof 指针”得到的是指针本身(所指向的变量或对象的地址)的大小;typeid(T) == typeid(T&) 恒为真,siz 阅读全文

posted @ 2012-12-21 11:19 Crazy_程序猿 阅读(158) 评论(0) 推荐(0)

导航