iOS 下拉刷新視圖:PeriscopyPullToRefresh

jopen 9年前發布 | 8K 次閱讀 iOS開發 移動開發 PeriscopyPullToRefresh

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.baiduhome.net/lib/view/home/1441787234664

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!