2、button添加事件的方法
[button addTarget:self Action:@selector(changeView) forControlEvents:UIControlEventTouchUpInside]
3、设置iphone的方向
http://blog.youkuaiyun.com/cococoolwhj/article/details/8208991#
// Only valid for iOS 6+. NOT VALID for iOS 4 / 5.
-(NSUInteger)supportedInterfaceOrientations {
// iPhone only
if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
return UIInterfaceOrientationMaskLandscape;
// iPad only
return UIInterfaceOrientationMaskLandscape;
}
// Supported orientations. Customize it for your own needs
// Only valid on iOS 4 / 5. NOT VALID for iOS 6.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// iPhone only
if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
// iPad only
// iPhone only
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
4、设置iphone的plist
(1)设置Supported interface orentations来设置设备的方向
(2)设置状态栏是否显示Stauts bar is initialy hiden
5、iphone设备的判断
http://blog.youkuaiyun.com/a6472953/article/details/8597146
6、获取iphone路径
[[NSHomeDirectory() stringByAppendingPathComponent:@"Doucuments"]stringByAppendingPathComponent:@"SuccessLevel"]
获取Documents/SuccessLevel文件
7、jos json 数据解析
http://blog.youkuaiyun.com/enuola/article/details/7903632
8、方便调试之cocos2d-x中sprite显示图片边框方法
在ccConfig.h文件中搜索CC_SPRITE_DEBUG_DRAW,将0改为1即可显示ccsprite的图片边框,方便调整和做碰撞判断的一些视觉调整
9.UITextBox用法
http://blog.youkuaiyun.com/wudidalishi/article/details/7975775