swift - PopOverViewController: Wrong alignment of the top arrow -
i use popoverviewcontroller in swift application show dat when button pressed. button clickable black line can see in attached picture.
the problem top arrow (i'm not sure how should call it?) popoverviewcontroller should right under black button.
here function of display popoverviewcontroller:
@ibaction func btnshowmoretapped(_ sender: anyobject) { let vc = storyboard?.instantiateviewcontroller(withidentifier: "popoverviewcontroller") as! popoverviewcontroller vc.preferredcontentsize = cgsize(width: uiscreen.main.bounds.width - (uiscreen.main.bounds.width / 5), height: 310) let navcontroller = uinavigationcontroller(rootviewcontroller: vc) navcontroller.modalpresentationstyle = .popover navcontroller.isnavigationbarhidden = true let viewforsource = sender as! uiview let popmenu = navcontroller.popoverpresentationcontroller popmenu?.delegate = self popmenu?.sourceview = viewforsource present(navcontroller, animated: true, completion: nil) }
is there way can fix problem? hope explained problem can understand problem.
Comments
Post a Comment