문제

I've two buttons on iPad that opens two popups. They are opened with the code:

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

and

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

but my popView isn't opened in the same kind of way (the link with the calling button in positioned in different way. Why?

enter image description here

enter image description here

도움이 되었습니까?

해결책

Because you are giving the arrow direction UIPopoverArrowDirectionAny which mean it could be any, set the specific direction for homogeneous behaviour

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top