Subscript ‘subscript(_😃’ requires the types ‘String.Index’ and ‘Int’ be equivalent
解决如下:
let index: String.Index = contentStr.index(contentStr.startIndex, offsetBy: i)
btn.setTitle(""+contentStr[index...index], for: .normal)
Subscript ‘subscript(_😃’ requires the types ‘String.Index’ and ‘Int’ be equivalent
解决如下:
let index: String.Index = contentStr.index(contentStr.startIndex, offsetBy: i)
btn.setTitle(""+contentStr[index...index], for: .normal)