摘要: cocos 2d 中的CCSprite 无法识别触摸操作,需要自定义类。 解决思想:找到触摸发生的那个点,判断其是否在sprite的矩形区域内 完整代码如下://MySprite.h文件#import "CCSprite.h"#import "cocos2d.h"//自定义类继承与CCSprite,实现CCTouchOneByDelegate协议@interface MySprite : CCSprite@property (nonatomic,copy) NSString* spriteName;//定义精灵名属性-(id)initWithName:( 阅读全文
posted @ 2014-03-20 18:23 optt 阅读(671) 评论(0) 推荐(0) 编辑
摘要: First of all,Excel the method "prefersStatusBarHidden" in view controllers to set the status bar hiden 'YES' when inited1 [self perfersStatusBarHiden]Second,Excel the method "performSelector:@selector(setNeedsStatusBarAppearanceUpdate)" to set the view controller based st 阅读全文
posted @ 2014-03-20 10:29 optt 阅读(125) 评论(0) 推荐(0) 编辑