Error in for loop CGFloat

前端 未结 1 345
我寻月下人不归
我寻月下人不归 2020-12-22 09:07

I converted a project from Swift 2 to Swift 3 and now I get an error in the following line:

for i:CGFloat in 0 ..< 2.0 + self.frame.size.width / ( skyText         


        
1条回答
  •  时光取名叫无心
    2020-12-22 09:26

    In essence what you want is still a loop through integer values incremented by 1. So you can just calculate the last int value and use a simple for each loop:

    for i in 0..

    0 讨论(0)
提交回复
热议问题