Advertisement
srk72

PopOver Controller

May 20th, 2022
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.82 KB | None | 0 0
  1.     // present popover EditingPopoverController to change collage corners
  2.     @objc func changeCollageCorners() {
  3.        
  4.         let popOverView = self.storyboard?.instantiateViewController(withIdentifier: "EditingPopoverController") as! EditingPopoverController
  5.        
  6.         let nav = UINavigationController(rootViewController: popOverView)
  7.         nav.modalPresentationStyle = UIModalPresentationStyle.popover
  8.         let popover = nav.popoverPresentationController
  9.         popOverView.preferredContentSize = CGSize(width: 200,height: 80)
  10.         popover!.delegate = self
  11.         popover!.sourceView = navigationBaar.leftBarBut.imageView
  12.         popover!.sourceRect = navigationBaar.leftBarBut.bounds
  13.  
  14.         popOverView.slideProtocol = self
  15.        
  16.         self.present(nav, animated: true, completion: nil)
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement