2010-07-02 58 views

回答

1

如果你想彈出根視圖控件,然後使用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]; 
相關問題