Programmatically show the root controller popup in portrait mode

Is there a way to programmatically show the root view controller in portrait mode, responsive to user action?

in my application, the root view controller can be updated by reacting to some interaction with the part controller, and I would like to pop it up when that happens.

Thanks!

+4
source share
1 answer

If you want to open the root view control, use the UIPopOverController :

 self.QuickSearchPopView = [[[QuickSearchPopView alloc] initWithNibName:@"QuickSearchPopView" bundle:[NSBundle mainBundle]] autorelease]; //create a popover controller self.popoverController = [[[UIPopoverController alloc] initWithContentViewController:self.QuickSearchPopView] autorelease]; //present the popover view non-modal with a //refrence to the button pressed within the current view [self.popoverController presentPopoverFromRect:self.view.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; 
+1
source

Source: https://habr.com/ru/post/1314542/


All Articles