0

I have a variable 'userID' that is getting populated after validating through a parser. Now when I will press the login button, the next view will be a tabView (Consisting of 5 screens). Now I want this userID to be fixed for UILabel in all tabViews. How to do this ?

Thanks in advance.

  • you can find answer in http://stackoverflow.com/questions/5210535/passing-data-between-view-controllers – crz Aug 01 '13 at 10:39

1 Answers1

0

You can store it into NSUserDefaults using:

[[NSUserDefaults standardUserDefaults]setObject:userID forKey:@"USERID"];

and you can get its value anywhere using:

[[NSUserDefaults standardUserDefaults]objectForKey:@"USERID"]]
Ajay
  • 1,622
  • 20
  • 36