Rather presentViewController you need to call dismissModalViewcontroller to
remove the view from the UI.

Regards,

Dilshan

On Thu, Nov 5, 2015 at 8:44 AM, Inosh Perera <[email protected]> wrote:

> Hi Dilshan,
>
> I need to switch from LoginViewController to ViewController in the
> Main.Storyboard when the login is successful. I'm getting view is not in
> hierarchy issue when trying to do so as bellow. Do you know how this can be
> resolved? Additionally I tried,   [self.window makeKeyAndVisible]; as
> well. If I try the bellow code on applicationDidBecomeActive in
> AppDeligate.m the view is shown properly. But the issue is only shown when
> calling inside the callback method handleOpenURL.
>
>     UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main"
> bundle:nil];
>
>     UIViewController *unregisterViewController = [storyboard
> instantiateViewControllerWithIdentifier:@"unregisterViewController"];
>
>     unregisterViewController.modalPresentationStyle =
> UIModalPresentationFullScreen;
>
>     [self.window.rootViewController presentViewController:unregister
> ViewController animated:NO completion:nil];
>
>
> *iOSMDMAgent[605:101413] Warning: Attempt to present <LoginViewController:
> 0x166a1c60> on <ViewController: 0x16638150> whose view is not in the window
> hierarchy!*
>
> Regards,
> Inosh
>
> --
> Inosh Perera
> Software Engineer, WSO2 Inc.
> Tel: 0785293686
>



-- 
Dilshan Edirisuriya
Senior Software Engineer - WSO2
Mob: + 94 777878905
http://wso2.com/
https://www.linkedin.com/profile/view?id=50486426
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to