Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Build a Blog Reader iPhone App Exploring the Master-Detail Template Modifying the Master-Detail Template

Difficulty answering

Hi I can't figure out part 3 (line 3) of this challenge. Here's what I wrote:

NSArray *booksArray = [NSArray arrayWithObjects:@"Hamlet",@"King Lear",@"Othello",@"Macbeth",nil]; NSString *bookTitle = [booksArray objectAtIndex:2]; [self.bookTitle uppercaseString];

Thanks for your help!

3 Answers

Patrik Balogh
Patrik Balogh
47,986 Points

Hi! Change self.bookTitle to bookTitle at the end (before uppercaseString).

Jimmy Hsu
Jimmy Hsu
6,511 Points

I believe bookTitle doesn't need self to be called. I don't believe it's necessary as bookTitle is within the same scope.

Remove the self. from self.bookTitle and it should work.

NSArray *booksArray = [NSArray arrayWithObjects:@"Hamlet", @"King Lear", @"Othello", @"Macbeth", nil];
NSString *bookTitle = booksArray[2];
[bookTitle uppercaseString];
Patrik Balogh
Patrik Balogh
47,986 Points

Really Jimmy Hsu?! WOW. Good idea....... :S((

Jimmy Hsu
Jimmy Hsu
6,511 Points

I'm sorry?

I didn't see your reply as replies and comments do not dynamically update as I type them. I also thought it would be more help as to explain what went wrong, as understanding the issue and where you went wrong is crucial to learning.

Awesome thanks for the help guys! It worked :)