I got this code snippet from the web, but my Xcode is complaining:
C-style for statement has been removed in Swift 3
Can someone help me migrate the following code to Swift 4?
for (var i = 1; i < dataByLine.count; i++) {
}
I got this code snippet from the web, but my Xcode is complaining:
C-style for statement has been removed in Swift 3
Can someone help me migrate the following code to Swift 4?
for (var i = 1; i < dataByLine.count; i++) {
}
Here's your statement in Swift 4:
for i in 1..<dataByLine.count {
}