为什么我的UIPopoverController以这种方式弹出?

时间:2014-01-29 11:34:53

标签: ios ipad uipopovercontroller uipopover

我在iPad上有两个按钮可以打开两个弹出窗口。用代码打开它们:

CGRect frame = [self.view convertRect:self.addNewFolderButton.frame fromView:self.addNewFolderButton.superview];
    [self.popover presentPopoverFromRect:frame
                                  inView:self.view
                permittedArrowDirections:UIPopoverArrowDirectionAny
                                animated:YES];

CGRect frame = [self.view convertRect:self.addNewUserButton.frame fromView:self.addNewUserButton.superview];
    [self.popover presentPopoverFromRect:frame
                                  inView:self.view
                permittedArrowDirections:UIPopoverArrowDirectionAny
                                animated:YES];

但是我的popView没有以同样的方式打开(带有调用按钮的链接以不同的方式定位。为什么?

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

因为你给出的箭头方向UIPopoverArrowDirectionAny意味着它可以是任意的,所以设定同质行为的具体方向