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()
        }

  • 相关阅读:
    03-spring bean
    04-spring的依赖注入
    01-课程安排
    17-注解开发
    WIN10新机必要设置记录 for 3dsmax
    ps导出svg
    VS C# 共享项目
    在Maxscript中创建.Net类型
    C# 自定义索引
    C# ?
  • 原文地址:https://www.cnblogs.com/yujidewu/p/6101967.html
Copyright © 2011-2022 走看看