In my app, i have implemented an access token logic. After Login, in the ViewDidLoad of my dashboard, am calling a web service to get the list of businesses. In the
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
method, am parsing the values. If the AT tag(access token) is expired(i ll get a msg 'access token is invalid), i would like to call the login page(session expired). But i get the error in console
Unbalanced calls to begin/end appearance transitions for .
and the control remains in my dashboard.
NSString *OSString = [jsonMain valueForKey:@"OS"];
NSString *errorString = [jsonMain valueForKey:@"EM"];
if([OSString isEqualToString:@"Success"])
{
// other parsing stuff
}
else
{
if([errorString isEqualToString:@"Access Token is invalid"])
{
appDelegate.loginMsgStr = @"Session Expired";
Login *login = [[Login alloc] init];
[self.navigationController pushViewController:login animated:YES];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert!"
message:errorString
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
}
}