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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -