UIPopoverController解雇

时间:2011-11-21 19:50:49

标签: ios xcode uinavigationcontroller uipopovercontroller

UIPopoverController矩形之外的任何地方触摸UIPopoverController时,是否有一个方法被调用?

状态:

firstView有一个navBar。其UINavBarItem通过触摸调用UIPopoverControllerfirstView设置了一些值,因此firstViewUIPopoverController被解除时必须更新。

(P.S。viewDidAppear不起作用!)

谢谢!

2 个答案:

答案 0 :(得分:3)

将一个代表分配给popover;然后你有popoverControllerDidDismissPopover:popoverControllerShouldDismissPopover:

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPopoverControllerDelegate_protocol/Reference/Reference.html

答案 1 :(得分:1)

 you can dismiss your popover controller on touchesBegan method. this method call when you touch on view.


    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    {
        [popover dismiss];
    }


Hopefully help this.