I'm creating an iOS5 application using the storyboard features. The basic structure is:
LoginScreen ---(segue)--> MyScreen ---(press on logout)------(segue back to login screen)-->LoginScreen
it's pretty simple. The way I manage the first segue is:
- (void) onResponse:(NSMutableDictionary *)response {
NSLog(@"Login successful,token received");
// if the Login was successful,store the token
NSUserDefaults* userPref = [NSUserDefaults standardUserDefaults];
[userPref setObject:[response objectForKey:@"Token"] forKey:@"AuthToken"];
[userPref synchronize];
//..and let the user getting in
[self performSegueWithIdentifier:@"showHomeScreen" sender:nil];
}
Now,the strange thing is that the segue is correctly performed the first time,but,when I come back to the login screen after a logout the performSegueWithIdentifier: doesn't work anymore (no error messages,simply nothing happens). Not sure what's going on. Which might be the problem?
I attach a screenshot of the storyboard..you can see the loop in the top-right corner:
thanks a lot!
Claus