UILabel not changing when method called
Posted
by LyonJTill
on Stack Overflow
See other posts from Stack Overflow
or by LyonJTill
Published on 2010-04-19T16:26:06Z
Indexed on
2010/04/19
18:13 UTC
Read the original article
Hit count: 266
- (IBAction)restoreUserDefaults {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if([defaults objectForKey:@"Exam Name"] == nil) { examName = [[NSString alloc] initWithString:@"Name"]; } else { examName = [[NSString alloc] initWithString:[defaults objectForKey:@"Exam Name"]]; } [examNameLabel setText:[NSString stringWithFormat:@"%@",examName]]; }
Hey all,
Basically above is the method that is being called when one ViewController is being close and another is being opened the problem is, is that the UILabel in the new ViewController isn't changing to the value i need it to? Any ideas?
Regards
Lyon J Till
© Stack Overflow or respective owner