明明簡單的before、after甚至indexOf,swift非要用些看似高大上單詞來編寫函數方法,作得人難受
2018-03-31
For ; ; ; 在Swift3中這種方式已經不能寫了,會提示:C-style for statement has been removed in Swift 3。就是說這種C風格的for循環已經不被支持了,甚至連++這樣的符號也不支持了,所以我們能使用的就是for-in這種方式了
2018-02-16
swift 4 中 這個where 和 , 都不行了。會報錯
error: MyPlayground.playground:28:40: error: top-level statement cannot begin with a closure expression
for case let i in 1...100 , i % 3 == 0 {
^
error: MyPlayground.playground:28:40: error: top-level statement cannot begin with a closure expression
for case let i in 1...100 , i % 3 == 0 {
^
2018-02-12
Unary operator '++' cannot be applied to an operand of type '@lvalue Int'
一元運算符“++”不能應用于操作數的類型“@左值int”
需要改成"aWin+=1"
一元運算符“++”不能應用于操作數的類型“@左值int”
需要改成"aWin+=1"
2017-12-07