以编程方式在纵向视图中显示根控制器弹出窗口

问题描述:

有没有任何方式以编程方式显示响应用户操作的纵向模式下的根视图控制器?以编程方式在纵向视图中显示根控制器弹出窗口

在我的应用程序根视图控制器可以更新响应与细节控制器的一些用户交互,我想弹出它时发生。

谢谢!

如果你想弹出根视图控件,然后使用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];