I am seeing following error in my application. This happens when I am loading a new SubView in call back method. Below are complete details.
In my application I have RootViewController as the app launches it adds a subview called "AuthCheck". In it I perform authentication checks displaying to user details of what's happening. In the AuthCheckController I have a call back method to handle async auth process as shown below.
- (void)shellAuthRequired: (ServiceResponse *)response {
[super shellAuthRequired:response];
if (response.hasError) {
[self showTryAgainAlert: response.errorText];
return;
}
// TODO: go to main screen from here.
IntroViewViewController *intview = [[IntroViewViewController alloc]initWithNibName:@"IntroViewViewController" bundle:nil];
//[self.navigationController pushViewController:intview animated:YES];
[self.view addSubview:intview.view];
}
In this method as you see I forward the user to a new screen where I display necessary auth related details and the screen will have an continue button. When user clicks on "Continue" I load a new SubView called "WebViewController". Code below
-(IBAction)btnContinueToClicked:(id)sender
{
WebViewController *wview = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:nil];
[self.view addSubview:wview.view]
}
I get the exception "[IntroViewViewController performSelector:withObject:withObject:]: message sent to deallocated instance 0xd062f50" when I add new subview to be forwarded to.
What is causing this error?
Thanks
Vish