Help with Uitextfield....

Posted by Skov on Stack Overflow See other posts from Stack Overflow or by Skov
Published on 2011-01-04T15:46:36Z Indexed on 2011/01/04 15:53 UTC
Read the original article Hit count: 208

Filed under:

Hey .... im working on a Iphone app ..i cant get this working:

i want this alert to show up if the text field is empty when clicking the button linked to "timedAlarm" and if the text filed has a text i want it to go ahead and do the local notification, every thing works fine, until i put in this code before all the code for the notification, i have tried a lot of ways, but it wont work, either the alert shows up, even if there is a text, or els the alert wont show.

- (IBAction) timedAlarm {

    if (eventText.text != nil){

        UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Excuse Me !" 
                                                          message:@"Plz enter an alarm text" 
                                                         delegate:nil 
                                                cancelButtonTitle:@"OK" 
                                                otherButtonTitles:nil]; 

        [message show]; 

        [message release]; 

    }else {

Hope u can help me :-D

Rene Skov

© Stack Overflow or respective owner

Related posts about xcode