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 Build a Self-Destructing Message iPhone App Using Parse.com as a Backend and Adding Users Signing Up New Users: Part 1 (UIAlertView)

Challenge task 4 of 4Now just send a message to the 'alertView' to show it to the user!

I take over challenge task 1 to 3 of 4, but I stuck on 4 of 4: I don't has any ideal to solve it following thchallenge's guide

import "NumberGuesserViewController.h"

import "GuessEngine.h"

import "UIAlertView.h"

@implementation NumberGuesserViewController

  • (IBAction)makeGuess:(id)sender { NSString userNumber; userNumber = self.numberField.text; // Check to see if the user's number is correct BOOL isCorrect = [GuessEngine testGuess:userNumber]; if (isCorrect) { UIAlertView alertView=[[UIAlertView alloc]initWithTitle:@"Hooray!" message:@"You did it!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; // Should I modify this line ????????? [alertView show]; }}

@end

what do you need help with because i don't really understand your question

2 Answers

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

Is this what you put in?

@implementation NumberGuesserViewController

(IBAction)makeGuess:(id)sender { NSString userNumber; userNumber = self.numberField.text; // Check to see if the user's number is correct BOOL isCorrect = [GuessEngine testGuess:userNumber]; if (isCorrect) { UIAlertView alertView=[[UIAlertView alloc]initWithTitle:@"Hooray!" message:@"You did it!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; // Should I modify this line ????????? [alertView show]; }}

@end

Yes, I put in so many . Now just send a message to the 'alertView' to show it to the user! How should I do to take a brief for send a message

The link to the 4 part challenge:

http://teamtreehouse.com/library/build-a-selfdestructing-message-iphone-app/using-parsecom-as-a-backend-and-adding-users/signing-up-new-users-part-1-uialertview-2

The line needed for part 4 of 4 is simply:

[alertView show]; 

See this forum thread if you need help up with 2/3 of 4: https://teamtreehouse.com/forum/code-challenge-3-of-4-build-a-selfdestructing-message-app-trouble

Part 1 of 4 (the line in the NumberGuesserViewController.h:

@property (strong, nonatomic) IBOutlet UITextField *numberField;