![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IOS学习记录
To_by
这个作者很懒,什么都没留下…
展开
-
IOS数据类型转换
[code="iOS"]NSString *tempA = @"123";NSString *tempB = @"456";[/code]1,字符串拼接[code="iOS"] NSString *newString = [NSString stringWithFormat:@"%@%@",tempA,tempB];[/code]2,字符转int[cod...原创 2012-05-29 10:43:10 · 220 阅读 · 0 评论 -
CCScene场景切换
CCScene场景切换代码:[code="Ios"]//触摸事件 - 当手指从屏幕抬起时调用的方法-Himi -(void) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { CCScene* scenec = [OtherLayout scene]; //部落格-----...原创 2012-05-29 10:44:59 · 125 阅读 · 0 评论 -
Cocos2D横竖屏设置
打开 RootViewController.m ,然后所有搜索如下代码:[code="Ios"]#elif GAME_AUTOROTATION == kGameAutorotationUIViewController // // EAGLView will be rotated by the UIViewController // //...原创 2012-05-29 10:46:22 · 238 阅读 · 0 评论 -
Cocos2d提供的字体
[code="iOS"]CCLabelTTF *myLabel = [CCLabelTTF labelWithString:@"AppleGothic" fontName:@"AppleGothic" fontSize:20];myLabel.position=ccp(70, 50);[self addChild:myLabel];CCLabelTTF *myLabel2 = [C...原创 2012-05-29 10:49:24 · 88 阅读 · 0 评论 -
Objective-C语言@property,与@synthesize配对使用
简介 Objective-C语言关键词,与@synthesize配对使用。 功能:让编译器自动编写一个与数据成员同名的方法声明来省去读写方法的声明。 如: 1、在头文件中:[code="iOS"] @property int variable;[/code] 等效于在头文件中声明2个方法:[code="iOS"] - (int)vari...原创 2012-05-30 12:57:46 · 107 阅读 · 0 评论 -
IOS获取屏幕分辨率
资料收集于网络,仅供参考学习,勿做商业用途。1、得到当前屏幕的尺寸:[code="IOS"]CGRect rect_screen = [[UIScreenmainScreen]bounds]; CGSize size_screen = rect_screen.size;[/code] 2、获得scale:[code="IOS"]CGFloat scal...原创 2012-03-09 15:32:25 · 94 阅读 · 0 评论 -
IOS部分部件大小
iPhone 3 resolution:163ppiiPhone 4 resolution:326ppiiPad resolution:132ppiiPad retina resolution:264ppi iPhone screen:320pts * 480ptsiOS App launch imagesiPhone 3G/3GS:320px *480pxiP...原创 2013-02-28 13:38:06 · 170 阅读 · 0 评论