Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top