iOS developers accumulate bits and pieces

Original link: http://www.cnblogs.com/yang3wei/archive/2012/03/20/2739837.html

1. UISwitch usage summary

http://www.cnblogs.com/KidReborn/archive/2010/10/05/1843087.html

1.UISwitch initialization

* = SwitchView UISwitch [[UISwitch the alloc] the initWithFrame: CGRectMake (4.0f, 16.0f, 100.0f, 28.0f)];
2. Set the initialized state UISwitch
switchView.on = YES; // initially set to ON side
3. in response UISwitch events

[switchView addTarget:self action:@selector(switchAction:) forControlEvents:UIControlEventValueChanged];



2. NSString to BOOL (the object's class is determined)

#define BYStringFromBOOL(aBOOLaBOOL? @"YES" : @"NO"

NSLog(@"Is Kind of NSString: %@", BYStringFromBOOL([thing isKindOfClass: [NSStringclass]]);



3. Related information cocos2d generic UI controls

http://www.cnblogs.com/andyque/archive/2011/04/07/2007791.html



4. cocos2d Best Practices

http://code.google.com/p/cocos2d-iphone/wiki/BestPractices



5.UIView of  when viewDidUnload be called?

http://www.cocoachina.com/bbs/read.php?tid=21015

Reproduced in: https: //www.cnblogs.com/yang3wei/archive/2012/03/20/2739837.html

Guess you like

Origin blog.csdn.net/weixin_30284355/article/details/94782700