-
String Mutability let String => NSString var String => NSMutableString查看全部
-
import UIKit for index in 1..<10 { index // index = 3 } let courseNames = ["玩儿转Swift", "慕课网2048私人定制", "CSS3 3D特效"]; for i in 0..<courseNames.count { courseNames[i] }查看全部
-
Range Operator Closed Range Operator 闭区间 [a, b] a...b Half-Closed Range Operator 前闭后开区间 [a, b) a..<b查看全部
-
Range Operator查看全部
-
var userNickName:String? let outputName:String = userNickName ?? "Guest" println("Hello, " + outputName)查看全部
-
var userNickName:String? userNickName = "liuyubobobo" let outputName:String = userNickName != nil ? userNickName! : "Guest" println("Hello, " + outputName)查看全部
-
var userNickName:String? let outputName:String = userNickName != nil ? userNickName! : "Guest" println("Hello, " + outputName)查看全部
-
import UIKit var userNickName:String? userNickName = "liuyubobobo" if userNickName != nil{ println("Hello, \(userNickName!)") }else{ println("Hello, Guest") }查看全部
-
Nil Coalescing Operator nil聚合运算符 a ?? b => a != nil ? a! : b查看全部
-
let statusBarHeight = 20 let basicViewHeight = 548 var inFullScreenMode = true var viewHeight = basicViewHeight + (inFullScreenMode?statusBarHeight:0) var score = 62 var rate = score >= 60 ? "及格" : "不及格"查看全部
-
Conditional Operator查看全部
-
comparison operator查看全部
-
var c = 0 0 c++ 0 c 1 ++c 2 c 2查看全部
-
Arithmetic Operator 算术运算符查看全部
-
let strA:String? = "test" strA strA! let strB:String! = "test" strB查看全部
举报
0/150
提交
取消