我想问一下如何在 TV 单元格下显示 UIActivityControl。这就是它现在的显示方式。谢谢
(self.tableView.refreshControl = self.refreshControl 不起作用)
代码:
override func viewDidLoad() {
super.viewDidLoad()
self.refreshControl = UIRefreshControl()
self.refreshControl.attributedTitle = NSAttributedString(string: "Aktualizace")
self.refreshControl.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged)
self.view.addSubview(self.refreshControl)
self.view.bringSubviewToFront(self.tableView)
}
最佳答案
您不需要 refresh_control 成员,也不需要将 refresh_control 添加为 subview 。
UITableViewController 有一个 refreshControl 成员。
试试这个:
self.refreshControl = UIRefreshControl()
self.refreshControl.attributedTitle = NSAttributedString(string: "Aktualizace")
self.refreshControl.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged)
关于ios - 刷新控件 - 显示在电视上方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33136577/