我想问你如何在电视细胞下展示UIActivityControl。这就是它现在的表现。感谢
(self.tableView.refreshControl = self.refresh_control 不起作用)
代码:
override func viewDidLoad() {
super.viewDidLoad()
self.refresh_control = UIRefreshControl()
self.refresh_control.attributedTitle = NSAttributedString(string: "Aktualizace")
self.refresh_control.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged)
self.view.addSubview(self.refresh_control)
self.view.bringSubviewToFront(self.tableView)
}
答案 0 :(得分:1)
您不需要refresh_control成员,也不需要将refresh_control添加为子视图。
UITableViewController有一个refreshControl成员。
试试这个:
self.refreshControl = UIRefreshControl()
self.refreshControl.attributedTitle = NSAttributedString(string: "Aktualizace")
self.refreshControl.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged)