Closed RehmakNatiq closed 9 years ago
After user is logged in
MenuViewController *controller = (MenuViewController *) [SlideNavigationController sharedInstance].leftMenu;
controller. UserName.text = SOME_USERNAME;
Or you could even post a notification, and observe it in the menu
Nothing happens . Text is not changed.
Log the controller, and the label and see if they are nil. If not, try saving the username, and set it when the menu is about to reveal, as the result of the notification. Sometimes views don't redraw their content correctly when they are not visible.
Perfect ! its working for me
I have a label at the top of menu which displays user name , At the app start i don't have user name . the user name is to be set when user is loged in, then how can i change the text after loging in . this is code i trying but no success :- UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
leftMenu.UserName.text=@"Rehmak"; [SlideNavigationController sharedInstance].leftMenu = leftMenu;
How can i do this ?