摘要:
CCLabelBMFont1.代码example1 -(void) testCCLabelBMFont2 {3 // create the label4 CCLabelBMFont *label = [CCLabelBMFont labelWithString: @"abc" fntFile: @"futura-48.fnt"];5 // set position of the label6 [label setPosition: ccp(240.0f, 160.0f)];7 // add the label to the layer8 [sel... 阅读全文
摘要:
使用Reachability检测网络连接状态Reachability.h 1 /* 2 3 File: Reachability.h 4 Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. 5 6 Version: 2.2 7 8 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. 9 ("Apple") in consideration of your.. 阅读全文
摘要:
UITextField// create text fieldUITextField *textField = [[UITextField alloc] initWithFrame: CGRectMake(50,50,200,40)];// set some propertiestextField.placeholder = @"please enter your id"; // set default texttextField.backgroundColor = [UIColor yellowColor]; // set background colortextFiel 阅读全文
摘要:
About restoreOriginalFrame in Cocos2dprevious version[CCAnimate actionWithAnimation:someAnim restoreOriginalFrame:NO]in cocos2d v2.0.0 [someAnim setRestoreOriginalFrame:NO];[CCAnimate actionWithAnimation:someAnim];difference between YES and NOYou need a sprite to call an animation, but the animation 阅读全文