iOS开发一些零碎积累

原文链接: http://www.cnblogs.com/yang3wei/archive/2012/03/20/2739837.html

1。UISwitch的用法总结

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

1.UISwitch的初始化

UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectMake(4.0f, 16.0f, 100.0f, 28.0f)];
2.设置UISwitch的初始化状态
switchView.on = YES;//设置初始为ON的一边
3.UISwitch事件的响应

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



2。BOOL to NSString(判断对象所属类)

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

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



3。cocos2d仿制UI控件的相关资料

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



4。cocos2d最佳实践

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



5.UIView 的 viewDidUnload何时被调用?

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

转载于:https://www.cnblogs.com/yang3wei/archive/2012/03/20/2739837.html

猜你喜欢

转载自blog.csdn.net/weixin_30284355/article/details/94782700