我想打印连接到酷文本字段集合的所有文本字段的总数。日志文件中只有 2 个。
import UIKit
class ViewController: UIViewController {
@IBOutlet var cool: [UITextField]!
@IBAction func press(_ sender: Any) {
for view in cool {
((cool.text! as NSString).integerValue += ((cool.text! as NSString).integerValue
}
}
}