zeeshan zeeshan - 1 year ago 147
Swift Question

For Swift 3 how to update ++ increment operator?

I have this line in my code:

column = column >= (numberOfColumns - 1) ? 0 : ++column


Since in Swift 3 the ++ operator will be deprecated, so I want to update this line. How do I update this line of code?

Answer Source

simply:

column = column >= (numberOfColumns - 1) ? 0 : column + 1