我正在看Xcode 7.3笔记,我注意到了这个问题.
++和 - 运算符已被弃用
有人可以解释为什么它被弃用了吗?我是对的,在Xcode的新版本中,你现在要使用而不是++这个x += 1;
++
x += 1
例:
for var index = 0; index < 3; index += 1 { print("index is \(index)") }
increment decrement swift swift2 swift3
decrement ×1
increment ×1
swift ×1
swift2 ×1
swift3 ×1