zeeshan zeeshan - 5 months ago 46
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

simply:

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