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 trialJohn Carr
Courses Plus Student 1,984 PointscameraViewController.m - return number of rows in section.
The error message i am getting is as follows - No visible @interface for 'NSString' declares the variable 'count'
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return [self.friends count]; <---- *ERROR LINE*
}
2 Answers
Richard Lu
20,185 PointsI think your self.friends property is set to a NSString object which does not contain a count method. Maybe you can try NSArray. Happy Coding!
John Carr
Courses Plus Student 1,984 PointsYes just done that Richard thanks.
John Carr
Courses Plus Student 1,984 Points..
John Carr
Courses Plus Student 1,984 PointsJohn Carr
Courses Plus Student 1,984 PointsOk i seem to have solve it in interface by declaring friends as an NSArray.
cameraViewController.h