iOS 下拉刷新视图:PeriscopyPullToRefresh

jopen 7年前

PeriscopyPullToRefresh 是下拉刷新视图,可以和 UIScrollView 及其子类一起使用。

override func viewDidLoad() {      super.viewDidLoad()      let titleView = PeriscopyTitleView(frame: CGRect(x: 0.0, y: 0.0, width: 140.0, height: CGRectGetHeight((self.navigationController?.navigationBar.frame)!)),                            attachToScrollView: tableView, refreshAction: {                             //your 'refreshing' code       })        //customization      titleView.titleLabel.textColor = .whiteColor()      titleView.releaseLabel.textColor = .whiteColor()      titleView.releaseLabel.highlightedTextColor = UIColor(red:207/255.0, green:240/255, blue:158/255, alpha:1.0)      titleView.releaseLabel.text = "Release to reload"        self.navigationItem.titleView = titleView  }

iOS 下拉刷新视图:PeriscopyPullToRefresh

项目主页:http://www.open-open.com/lib/view/home/1441787234664