zoukankan      html  css  js  c++  java
  • iOS UIRefreshControl-刷新tableView

    override func viewDidLoad() {
            super.viewDidLoad()
            refreshControl = UIRefreshControl.init()
            refreshControl?.attributedTitle = NSAttributedString.init(string: "努力加载....", attributes: [NSForegroundColorAttributeName:UIColor.yellow, NSFontAttributeName:UIFont.systemFont(ofSize: 20), NSTextEffectAttributeName: NSTextEffectLetterpressStyle])
            refreshControl?.tintColor = UIColor.yellow
            refreshControl?.backgroundColor = UIColor.init(patternImage: UIImage.init(imageLiteralResourceName: "1.jpg"))
            refreshControl?.addTarget(self, action: #selector(LPCTableVC.testRefresh), for: UIControlEvents.valueChanged)
            tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")
        }
        func testRefresh() {
            NSLog("刷新")
            //结束刷新
            refreshControl?.endRefreshing()
        }

  • 相关阅读:
    12. nc/netcat 用法举例
    7. 由一道ctf学习变量覆盖漏洞
    11. 几点基于Web日志的Webshell检测思路
    约瑟夫环
    栈结构的经典算法题
    二叉查找树之二
    fork与vfork
    数组常见算法题
    赛马问题
    fibonacci 数列及其应用
  • 原文地址:https://www.cnblogs.com/yujidewu/p/6101967.html
Copyright © 2011-2022 走看看