daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Feb 18th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @IBAction func emojiButtonTapped(_ sender: UIButton) {
  2.     let VC = storyboard?.instantiateViewController(withIdentifier: "EmojiController") as! EmojiViewController
  3.     VC.preferredContentSize = CGSize(width: 200, height: 100)
  4.     let navController = UINavigationController(rootViewController: VC)
  5.     navController.modalPresentationStyle = UIModalPresentationStyle.popover
  6.  
  7.     let popOver = navController.popoverPresentationController
  8.     popOver?.sourceView = sender
  9.     popOver?.sourceRect = sender.bounds
  10.     popOver?.delegate = self
  11.  
  12.     self.present(navController, animated: true, completion: nil)
  13. }
  14.  
  15. func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
  16.     return .none
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top