08 2012 档案

Xcode debug时如何看crash的call stack
摘要:debug的时候,会经常碰到crash之后xcode如下显示:*** First throw call stack:(0x330f188f 0x35096259 0x3303a9db 0x96801 0x8ebbb 0xa03d9 0x9c2e3 0x49f63 0x66a8f 0x687ad 0x3258e86f 0x3258e7c5 0x3317c001 0x3541160d 0x330baf13 0x330c5523 0x330c54c5 0x330c4313 0x330474a5 0x3304736d 0x33194439 0x35626cd5 0x883a3 0x21f0)termi 阅读全文

posted @ 2012-08-29 13:29 dqshll 阅读(4328) 评论(0) 推荐(0)

如何在cocos2d项目中enable ARC
摘要:基本思想就是不支持ARC的代码用和支持ARC的分开,通过xcode中设置编译选项,让支持和不支持ARC的代码共存.cocos2d是ios app开发中最主流的2d游戏引擎,但是cocos2d开发的时候,苹果还没有推出 ARC(automatic reference counting,一种辅助内存管理的机制,编译器自动在代码中加入内存管理的语句,防止因开发者的疏忽造成的内存泄露和崩溃问题).所以如果你用cocos2d模版生成的工程,ARC是关闭的.如果直接enable ARC, 就会出现很多编译错误.要想享用ARC的好处,就要自己想办法了.基本思路就是,将cocos2d的文件不使用ARC.在xc 阅读全文

posted @ 2012-08-27 11:45 dqshll 阅读(1304) 评论(0) 推荐(0)

如何完全卸载NTFS-3G
摘要:今天遇到安装ntfs 3g后,找不到libfuse库的报错,就到网上找答案,一找不要紧,发现关于如何卸载ntfs 3g很多误人子弟的说法.其实卸载ntfs-3g的答案就在其手册中,第五页明明白白的写了如何卸载. 可以再NTFS-3G的偏好设置里有个按钮.如果这样仍然无法卸载, 可以直接执行一个shell脚本即可. 这个脚本的路径在/System/Library/Filesystems/ntfs-3g.fs/Support/uninstall-ntfs-3g.sh下面是手册中的描述.2.2 Uninstalling NTFS-3G NTFS-3G can be easily uninstalle 阅读全文

posted @ 2012-08-21 14:13 dqshll 阅读(3793) 评论(0) 推荐(0)

cocos2d 和 cocos3d的版本问题
摘要:这几天折腾我的cocos2d的工程,做了两件事1. 应用了cocos3d v0.7.1,把几个3d动画,包括pod文件和贴图成功地跑起来了.实现了2d和3d混合的界面.2. 升级cocos2d,从v1.0.1升级到v2.0.因为openGL的版本不同,还改动了不少代码.建议大家要升级的千万不要相信官网的option1,一定选择option2,就是重新建一个干净的工程,把自己的code加进去,这是最有效的方法,可以避免大部分问题.结果发现这两件事不能兼容,因为最新的cocos3d v0.7.1是基于cocos2d v1.0.1,根本不兼容cocos2d v2.0. 根本原因还是openGL的版本 阅读全文

posted @ 2012-08-20 12:03 dqshll 阅读(3709) 评论(0) 推荐(1)

Mac OS X下的截屏功能和使用技巧
摘要:对全屏的截图我们可以通过按 苹果键(花键)+Shift键+3来执行,之后伴随着清脆的一声提示音后,在桌面上就会生成一个图片文件,这就是刚刚截屏的图片了,默认文件类型是PNG的。 自定义截屏是很方便的一个功能,是可以通过按 苹果键(花键)+ Shift键 + 4来执行,当执行组合按键之后鼠标指针的光标会变成十字,现在你就可以画出你想要截取屏幕的范围了,画好后截出的图片也会放在桌面上。另外,如果在按 苹果键(花键)+Shift键+4后按下 空格键,鼠标指针就会变成一个小照相机,这时是截取对象方式的截屏,把小照相机放在你想截图的窗口上按鼠标左键后就执行了对该窗口的截屏,很方便吧,还有一个用法就... 阅读全文

posted @ 2012-08-17 17:15 dqshll 阅读(192) 评论(0) 推荐(0)

[iOS]Audio Format - afconvert
摘要:when you want to convert your music or sound effect file to your ios application, you need to convert them to some audio format even though iOS can support many format to achieve performance and decrease your app size.there are some good command0: afplay xxx.xxx can test if it can be played after yo 阅读全文

posted @ 2012-08-17 17:14 dqshll 阅读(335) 评论(0) 推荐(0)

[cocos2d]Build only one project to support all ios devices with cocos2d
摘要:There are 4 resolution ios devices currently: iphone, iphone 4(s), ipad1/2, new ipad, feel painful about this? don't tell your feeling to android developers.in cocos2d, just use suffix to the image files or atlas as below rules:static NSString *__suffixiPhoneRetinaDisplay =@"-hd"; // f 阅读全文

posted @ 2012-08-17 17:10 dqshll 阅读(197) 评论(0) 推荐(0)

[ios] where to find your iphone app on your mac during debuging
摘要:some time we need to figure out if any resoures files are already packed in the app. we can find it from mac under the path as below, in this case the app name is 3dhw:/Users/dingqun2008/Library/Developer/Xcode/DerivedData/3dhw-dychilwmyhglaeaalsypvckomsud/Build/Products/Debug-iphoneos/3dhw.app/3dhw 阅读全文

posted @ 2012-08-17 16:59 dqshll 阅读(167) 评论(0) 推荐(0)

[cocos2d]create annimation sprite controled by ourself
摘要:1. create a batchnode like with the picture created by Textures PakerCCSpriteBatchNode *spriteSheet =[CCSpriteBatchNode batchNodeWithFile:@"AnimBear.jpg"];2. cache sprite frames with plist (also created together with above)[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFil 阅读全文

posted @ 2012-08-17 16:56 dqshll 阅读(218) 评论(0) 推荐(0)

导航