UIPopover without any arrows

前端 未结 17 1243
说谎
说谎 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

    To make a pop over direction none and make it to appear in center of the view controller :

    let PopSrnVar = popoverPresentationController
    let ConRctVar = view.frame
    PopSrnVar!.sourceRect = CGRectMake(ConRctVar.width/4, ConRctVar.height/4, ConRctVar.width/2, ConRctVar.height/2)
    // To make arrows as none
    PopSrnVar!.permittedArrowDirections = UIPopoverArrowDirection()
    

提交回复
热议问题