UIPopover without any arrows

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

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

17条回答
  •  [愿得一人]
    2020-12-08 02:40

    Do not use Popovers if you don't want to show arrows. Present your view controller as a Modal and use a UIModalPresentationFormSheet instead.

    Example:

    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"MyStoryBoard" bundle:nil];
    UIViewController* viewController = [sb instantiateViewControllerWithIdentifier:@"myViewController"];
    viewController.modalPresentationStyle = UIModalPresentationFormSheet;
    [presenterViewController presentViewController: viewController animated:YES completion:^{
    
    }];
    

提交回复
热议问题