近期学Swift,当在使用到 ++操作符时,警告过期了,看官方解释如下。
The ++ and -- operators have been deprecated, and are slated to be removed in Swift 3.0. As a replacement, use x += 1 on integer or floating point types, and x = x.successor() on Index types.
++,--替换了 +=1,-=1 ,
如果是索引时 换成 x.successor()