【问题标题】:Refresh Control - showing above TV刷新控制 - 显示在电视上方
【发布时间】:2016-01-13 04:55:51
【问题描述】:

我想问你如何在电视单元格下显示 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)
}

【问题讨论】:

    标签: ios swift uitableview uirefreshcontrol


    【解决方案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)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-30
      • 1970-01-01
      • 1970-01-01
      • 2013-03-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多