开发者

Stop UIPopover from dismissing automatically part II

开发者 https://www.devze.com 2023-03-29 17:29 出处:网络
Sorry I previously posted a question here, but The answers I got didn\'t work (probably my 开发者_StackOverflow社区fault).

Sorry I previously posted a question here, but The answers I got didn't work (probably my 开发者_StackOverflow社区fault).

Basically, I want to stop a UIPopover from dismissing automatically. I got to this piece of code:

    - (BOOL) popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController
{
    return NO;
}

which I put in, but it doesn't seem to have any effect. Is there anything else I should add? am I putting it in the right place (I was putting it in the vc.m of the view that has the popover within it)?

Thanks Very Much,

Luke


Check to make sure the UIPopover delegate is set. You can do this in code by setting the popover instance variable:

aPopover.delegate = self;

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号