ios - Label on view does not change text on initial load -


i have label on top of view. after enter string text field on different view, string saved nsuserdefaults upon clicking uibutton. uibutton segues uitabbarcontroller. want label @ top of shown tab change string saved previous view. have @ moment this.

-(void)viewwillappear:(bool)animated {     // additional setup after loading view.     self.prefs = [nsuserdefaults standarduserdefaults];     nsstring *username = [self.prefs stringforkey:@"username"];     self.usernamelabel.text = username; } 

this in viewcontroller.m file first tab in tab bar controller.

the issue when segue happens, label left blank; however, when change second tab , first, label not accurately changed. i'm sure it's simple fix, on head.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -