Note. The accepted answer about popovers is correct if you want a popover. But you may need only a modal window, not a window with an arrow! Then this is the solution.
To implement a popup in your own ViewController, create a ViewController in your storyboard, then use segue with the following properties:

This causes your View Controller to display modally. To change the runtime size of your view controller, check the following view controller settings:

Another way to implement a user dialog is to use the UIAlertController . This is pretty flexible these days, but it's still pretty limited. if you want to use your own design and several elements, it is better to use a custom UIViewController.
Hope this helps.
Mike keskinov
source share