refresh control
作者:
四毛哥掉落的鳞片 | 来源:发表于
2016-10-22 17:57 被阅读0次override func viewDidLoad() {
super.viewDidLoad()
self.tableView.tableFooterView = UIView(frame: CGRect.zero)
// refresh control
let refreshControl = UIRefreshControl()
refreshControl.backgroundColor = UIColor.clear
refreshControl.tintColor = UIColor.red
refreshControl.addTarget(self, action: #selector(refresh(refreshControl:)), for: .valueChanged)
self.tableView.addSubview(refreshControl)
}
// selector for refresh control
func refresh(refreshControl: UIRefreshControl) {
// to be done in the future.
print("refresh")
refreshControl.endRefreshing()
}
本文标题:refresh control
本文链接:https://www.haomeiwen.com/subject/jcshuttx.html
网友评论