I under iOS 8. With my implementation of UIRefreshControl every first time I get a problem of flicker come back to the top My table view (which means when the app has just started), I have shown flicker down in GIF. It does not happen at any later time until I go to the top of the table until this view is again full, so I did something in the second scene of the app or it completely restarted.
This is in the viewDidLoad of your application Code ():
go to refreshControl = UIRefreshControl () override viewDidLoad () {super.viewDidLoad () function // UIRefreshControl when appearing in self.refreshControl.endRefreshing (sometimes waking up to appear To prevent this here) UpdateData () refreshControl.backgroundColor = UIColor (Color: 0.58, Saturation: 1.0, Brightness: 0.43, alpha: 1.0) refreshControl.tintColor = UIColor.whiteColor () refreshControl.addTarget (self, action: " UpdateData ", forControlEvents: UIControlEvents.ValueChanged) tableView .addSubview (Refresh The control controller has been declared out of view, as a deedload () function, I want to call the end refreshing method from within my updateData () function. The obvious way of doing this seemed like this.
I was able to solve it by changing the following line
TableView.addSubview (refreshControl)
to tableView.insertSubview (refreshControl, atIndex: 0)
this Thanks for the comment:
No comments:
Post a Comment