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 Implementing Designs for iPhone Customizing Table View Controllers Customizing Table View Cell Disclosure Indicators

Devin Scheu
Devin Scheu
66,191 Points

IOS

can somebody walk me step by step through this whole challenge or just gimme a answer because im done trying on it :/

MenuViewController.m
#import "MenuViewController.h"

@implementation MenuViewController

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

    // ... some code omitted for brevity ...


    return cell;
}

@end

what is the problem you are having ?

Devin Scheu
Devin Scheu
66,191 Points

not passing the challenge, i have no clue what i'm doing wrong.

can you post the question ?

Devin Scheu
Devin Scheu
66,191 Points

This app has a menu for a pizza restaurant, and the owner has requested an image of a pizza slice be used instead of arrows as the disclosure indicators for cells in the menu. In the video we saw how to use a custom disclosure indicator from the MSCellAccessory library, but we can use our own custom image instead. Start by initializing a UIImage variable using the 'imageNamed' class method and 'pizza_slice' as the image name.

did it work ?

Glad I help you :) have a nice day

1 Answer

So basically they are asking to change the cell disclosure to your own image...

            - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
      UIImage *Image = [UIImage imageNamed:@"pizza_slice"];
    cell.accessoryView =[[[UIImageView alloc]  initWithImage:Image] autorelease];
          return cell ;}