UIPopover without any arrows

前端 未结 17 1189
说谎
说谎 2020-12-08 02:15

Is it possible to present a popover without any sort of arrows pointing somewhere?

17条回答
  •  伪装坚强ぢ
    2020-12-08 02:21

    I use popover to show menu depending on touch coordinate. In this case popover uses maximum height of self.view

    CGRect popeverFrame = CGRectMake(touchPoint.x, touchPoint.y, 0, 0);
    [self.popover presentPopoverFromRect:popeverFrame
                                  inView:self.view
                permittedArrowDirections:UIPopoverArrowDirectionAny
                                animated:YES];
    

    But when I use 0-direction. Popover rectangle doesn't set it height to maximum and can only be set by appropriate property.

    CGRect popeverFrame = CGRectMake(touchPoint.x, touchPoint.y, 0, 0);
    [self.popover presentPopoverFromRect:popeverFrame
                                  inView:self.view
                permittedArrowDirections:UIPopoverArrowDirectionAny
                                animated:YES];
    

    Hope this will help: Help with UIPopOverController size

提交回复
热议问题