How to Pull Up Refresh in UITableView or UICollectionView
Step 1 :- Create Object
Step 2 :- initialise with Controller
Step 3:- Create Objective Functions
var pullRefresh : UIRefreshControl = UIRefreshControl()
Step 2 :- initialise with Controller
pullRefresh.addTarget(self, action: #selector(self.pullRefreshView), for: .valueChanged)
pullRefresh.tintColor = UIColor.clear
self.tblOjbect!.addSubview(pullRefresh)
self.tblOjbect!.alwaysBounceVertical = true
self.tblOjbect!.bounces = true
Step 3:- Create Objective Functions
@objc func pullRefreshView()
{
pullRefresh.endRefreshing()
// Write here what you what on pull Up Refresh
}
Comments
Post a Comment