#warning: C-style for statement is deprecated and will be removed in a future version of Swift [duplicate]
问题 This question already has an answer here: Replacement for C-style loop in Swift 2.2 4 answers I just download a new Xcode (7.3) with swift 2.2. It has a warning: C-style for statement is deprecated and will be removed in a future version of Swift. How can I fix this warning? 回答1: Removing for init; comparison; increment {} and also remove ++ and -- easily. and use Swift's pretty for-in loop // WARNING: C-style for statement is deprecated and will be removed in a future version of Swift for