标签:style for attr table load tor ddt shc text
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()
}
iOS UIRefreshControl-刷新tableView
标签:style for attr table load tor ddt shc text
原文地址:http://www.cnblogs.com/yujidewu/p/6101967.html