Using storyboards i have a tab bar controller with 2 views. In one view i want to have the ability to send the user in another view if is not logged in.
Show in the FirstView i have this:
- (void) viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
if(![self loggedin])
{
ErrorView *wizard = (ErrorView*)[[UIStoryboard storyboardWithName:@"Main_iphone" bundle:nil] instantiateViewControllerWithIdentifier:@"wizard"];
[wizard setModalPresentationStyle:UIModalPresentationFullScreen];
[self presentViewController:wizard animated:NO completion:nil];
}
.....
If the user is not logged in i'am getting this error:
Warning: Attempt to present on whose view is not in the window hierarchy!
Any help will be very appreciable.