4

ユーザーのアクションに応答して、ポートレート モードでルート ビュー コントローラーをプログラムで表示する方法はありますか?

私のアプリでは、詳細コントローラーとのユーザーのやり取りに応じてルートビューコントローラーを更新できます。それが発生したときにポップオーバーしたいと思います。

ありがとう!

4

1 に答える 1

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];
于 2011-06-08T06:35:15.857 に答える