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 trialAlfredo Gafas
531 Pointstextlabel
hello there, im having a problem on cell.textlabel.text
say "property no exist.
Alfredo Gafas
531 Points-
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"cell"; UITableView *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
cell.textlabel.text = [self.title objectAtIndex:indexPath.row];
return cell;
4 Answers
Gareth Borcherds
9,372 PointsOh I couldn't really see your code cause it's not formatted, but you're using the wrong pointer.
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
//Instead of what you have
UITableView *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
Gareth Borcherds
9,372 PointsHave you changed the table view cell style in attributes inspector? Only certain styles have that property. Try setting it to subtitle and see if that gets rid of your error.
Alfredo Gafas
531 Pointswhat i see im using xcode 5 and the video is xcode 4, and yes i change the TableViewControler
Alfredo Gafas
531 PointsThanks that fix the error on the return cell; but still the problem on the textlabel THANK SO MUCH for some reason the identifier was not working. but i pass.. :)
Gareth Borcherds
9,372 PointsGareth Borcherds
9,372 PointsCan you post more of your code, like what method are you using that function in?