ios - dismissViewControllerAnimated didn't work if monitor is connected -


i have main view controller , use these following code show next view , dismiss view.they working if there no external monitor attached. if attached, can't dismiss view controller although can present view controller. how shall do?

[[[[uiapplication sharedapplication] keywindow] rootviewcontroller] presentmodalviewcontroller:navcontroller animated:yes];   [[[[uiapplication sharedapplication] keywindow] rootviewcontroller] dismissviewcontrolleranimated:yes completion:null]; 

this external monitor view.

externaldisplayhandler = [[externaldisplayhandler alloc] init]; externaldisplayhandler.delegate = self;  if(externaldisplayhandler.monitorexists) {      //other code      nslog(@"externaldisplayhandler.monitorexists");      [externaldisplayhandler.contentview addsubview:viewonmonitor];      nslog(@"tv attached");  } 

i remember there other ways too. change combination.

[self presentviewcontroller:lmvc animated:yes completion:nil];  [self.presentingviewcontroller  dismissviewcontrolleranimated:yes completion:nil]; 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -