I can't belice I am asking this, but im very crazy with this variable stuff.
I want to save a username information. I load them at the load of my view. After this I will get the information when I click on a button.
Here is my code:
@interface SelfViewController : UIViewController
{
NSString *usernameString;
}
- (void)viewDidLoad
{
usernameString = @"test";
}
- (IBAction)goToProfileButtonPressed:(id)sender
{
NSLog(@"%@", usernameString); //CRASH BAD EXEC
}
What did I wrong????