hi,
i update my xcode version(xcode 7.3.1 to xcode 8.3.3), then i have been experienced an error "c-style for statement has ben removed in swift3".
how to convert the below code into swift3.1.
fileprivate func drawYLabels() {
var yValue: CGFloat
let (start, stop, step) = self.y.ticks
for var i: CGFloat = start; i <= stop; i += step {
yValue = self.bounds.height - self.y.scale(i) - (y.axis.inset * 1.5)
let label = UILabel(frame: CGRect(x: 0, y: yValue, width: y.axis.inset, height: y.axis.inset))
label.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.caption2)
label.textAlignment = .center
label.text = String(Int(round(i)))
self.addSubview(label)
}
}
what shall i do to remove this error.