Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Refresh Control in UITableViewController ios7

I am parsing an xml file and displaying it's content in a UITableView, I want to set up the pull to refresh feature. I noticed in the "attributes inspector" there is a section that says "Refreshing", I set that to Enabled. How do I actually set up the action to reload the data in the table? Thanks in advance.

like image 393
Brainz Avatar asked Jan 13 '14 00:01

Brainz


1 Answers

You can implements the pull to refresh feature programmatically via coding or by doing drag drops from the Storyboard. This is the example on how to do it in the easy way (using drag drops).

  1. Check the refreshing attribute on inspector
  2. Then take a look at the storyboard, there will be new view named Refresh Control created underneath the TableView. Do right click on the view then implements the Value Changed event.

Please see image below.

enter image description here

like image 145
5 revs Avatar answered Sep 27 '22 22:09

5 revs