美文网首页
UIPopoverController 取消箭头

UIPopoverController 取消箭头

作者: Living_元宝儿 | 来源:发表于2019-11-13 14:17 被阅读0次

    UIPopoverController *popViewController = [[UIPopoverController alloc] initWithContentViewController:exchange_ViewController];

    popViewController.contentViewController.view.backgroundColor = [UIColor whiteColor];

    [popViewController setPopoverContentSize:CGSizeMake(400, 430) animated:YES];

    popViewController.delegate = self;

    [popViewController presentPopoverFromRect:CGRectMake(312, 95, 400, 430) inView:detailImageView permittedArrowDirections:0 animated:YES];

    取消箭头

    permittedArrowDirections:0

    代理方法

    - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController

    {

    [popViewController release];

    }

    // we finished rotating, if a popover is allocated, show it again in the new orientation

    //popoverRect的中心点是用来画箭头的,如果中心点如果出了屏幕,系统会优化到窗口边缘

    [self.popoverControllerpresentPopoverFromRect:savedPopoverRect

    inView:self.view//上面的矩形坐标是以这个view为参考的

    permittedArrowDirections:UIPopoverArrowDirectionAny//箭头方向

    animated:YES];

    相关文章

      网友评论

          本文标题:UIPopoverController 取消箭头

          本文链接:https://www.haomeiwen.com/subject/dvdvuttx.html