swift 中布局十分严格 切记要注意 左右一定要对称

使用注意:
;print() 替代 OC 中的 NSLog类名() 的格式,与 OC 中的 alloc/init 等价[[类名 alloc] initWithXXX], [类名 类名WithXXX]在 Swift 中通常可以使用 类名(XXX: )找到对应的函数[UIColor redColor] 类方法,在 Swift 中通常可以使用 类名.XXX() 找到对应的函数1.变量和常量

: 类型
OC定义字符串
/*:
OC的字符串:
NSString *str = @"hello";
格式化字符串: [NSString stringWithFormat:@"%.02f", 3.14159]
swift中定义字符串:
var 变量名 = "hello"
*/


原文:http://www.cnblogs.com/YRFios/p/4984645.html