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 trialmiles fishman
Courses Plus Student 3,610 PointsWhats wrong ? I can't find it
#import "MasterViewController.h"
@implementation MasterViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.refreshControl=[[UIRefreshControl alloc]init];
[self.refreshControl addTarget:self action:@selector(refreshBlogPosts) forControlEvents:UIControlEventValueChanged];
}
- (void)refreshBlogPosts {
if([self.refreshControl isRefreshing]){
[self.refreshControl endRefreshing];
}
3 Answers
Thomas Nilsen
14,957 PointsThe last challenge basically wants you to stop it, no checking necessary, so it would look like this:
- (void)refreshBlogPosts {
[self.refreshControl endRefreshing];
}
Thomas Nilsen
14,957 PointsI little more info would be helpful. Do you add the refreshControl via storyboards or programmatically? Do you receive an error or does the program run, but not as intended, and so on... :)
EDIT: I'm sorry, I thought you were building this in xcode. If it's a challenge I'll have a look :)
miles fishman
Courses Plus Student 3,610 Pointsyes i had to delete the if statement check!