ios - Objective C - After present modal view the root controller is incorrect -
the first view's name intropage
. second view's name search
. in viewdidappear
i'm using code:
search *search = [self.storyboard instantiateviewcontrollerwithidentifier:@"searchpage"]; search.modaltransitionstyle = uimodaltransitionstylecrossdissolve; [self presentviewcontroller:search animated:yes completion:nil];
everything ok when want see current view
[uiapplication sharedapplication].keywindow.rootviewcontroller;
he shows me current view "intro" instead "search" , causes lot of bugs.
when i'm changing code this:
[self performseguewithidentifier:@"searchpage" sender:self];
the problem solved can't use code because need add more properties transition.
by code added, search
modalviewcontroller of intro. doesn't mean search
rootviewcontroller.
if want change rootviewcontroller, have set search rootviewcontroller.
[[uiapplication sharedapplication] keywindow] setrootviewcontroller:search];
Comments
Post a Comment