zeeshan zeeshan - 4 months ago 36
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