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(aBOOL) aBOOL? @"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?
Reproduced in: https: //www.cnblogs.com/yang3wei/archive/2012/03/20/2739837.html