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
busterlabs
9,276 PointsAdding the edit friends screen [Solved]
Challenge Task 3 of 3
Finally, in the else condition, set the 'apps' property of this view controller using the data returned in the block. Then reload the data in the 'tableView' property of this view controller.
My Code:
import "AppsViewController.h"
import <Parse/Parse.h>
@implementation AppsViewController
-
(void)viewDidLoad { [super viewDidLoad]; PFQuery *query = [PFQuery queryWithClassName:@"Apps"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (error) { NSLog(@"Error: %@ %@", error, [error userInfo]); } else { self.allUsers = objects; [self.tableView reloadData]; } }];
}
@end
Result:
Bummer! Compilation Error! Check your syntax. Make sure you are using 'self' to reference properties.
3 Answers
arshin
17,770 PointsAdd "[self.tableView reloadData];" after the end of the block.
busterlabs
9,276 PointsI got this already. You can ignore. Thanks
Caleb Kleveter
Treehouse Moderator 37,862 PointsWhat did you do?