sexta-feira, 15 de fevereiro de 2013

[iOS] Using UIRefreshControl

In iOS 6 Apple presented us the UIRefreshControl to use with "Pull to Refresh" actions. This control is really easy to use and can be currently used with UITableView, UIScrollView and UICollectionView.

On your -(void)viewDidLoad method or the place where your controller will load for the first time, create and add the refresh control as a subview of the views mentioned above.

The next step is to create the refreshView method, just add it anywhere on your view controller.

That is it, nice and smooth.