以下是viewDidLoad
refreshControl = UIRefreshControl()
refreshControl.tintColor = UIColor.blue
refreshControl.attributedTitle = NSAttributedString(string: "Loading")
refreshControl.addTarget(self, action: #selector(self.refresh), for: UIControlEvents.valueChanged)
if #available(iOS 10.0, *) {
scrollview.refreshControl = refreshControl
} else {
scrollview.addSubview(refreshControl)
}
这是我的刷新功能
func refresh() {
print("Pull down refresh called")
}
除了iPhone 6以外,所有设备都可以正常使用。 我已经使用iPhone 6模拟器-iOS 10.3进行了测试 问题是什么?以及如何解决这个问题?