刷新控制 - 显示在电视上方 [英] Refresh Control - showing above TV

查看:25
本文介绍了刷新控制 - 显示在电视上方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问你如何在电视单元下显示 UIActivityControl.这就是它现在的显示方式.谢谢

I'd like to ask you how can I show UIActivityControl under TV cells. This is how it's showed right now. Thanks

(self.tableView.refreshControl = self.refreshControl 不起作用)

(self.tableView.refreshControl = self.refreshControl doesn't work)

代码:

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 添加为子视图.

You don't need the refresh_control member, nor do you need to add refresh_control as a subView.

UITableViewController 有一个 refreshControl 成员.

UITableViewController has a refreshControl member.

试试这个:

self.refreshControl = UIRefreshControl()
self.refreshControl.attributedTitle = NSAttributedString(string: "Aktualizace")
self.refreshControl.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged)

这篇关于刷新控制 - 显示在电视上方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆