Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Adding a pull-toRefresh 1 of 4

Challenge Task 1 of 4

Let's add a refresh control to the table view controller of the Blog Reader app from Treehouse. First, add a UIRefreshControl property to the header named 'refreshControl'. Make it nonatomic and strong.

I looked through the Ribbit zip download project files and I didn't find this..

So, looking around I found this StackOverFlow thread: http://stackoverflow.com/questions/16634919/refresh-tableview-content-with-uirefreshcontrol

..which had this useful line:

@property (nonatomic,strong) UIRefreshControl *refreshControl;

So the MasterViewController.h (not .m) file should be:

#import "UITableViewController.h"
#import "UIRefreshControl.h"

@interface MasterViewController : UITableViewController

@property (nonatomic,strong) UIRefreshControl *refreshControl;

@end

I wish the video transcripts actually had the code embedded in them so you don't have to keep jumping around from time index to time index searching for where a particular piece of code is typed out..