Skip to content

A subclass of UIViewController that will present a view as a popover dialog

License

Notifications You must be signed in to change notification settings

MaherKSantina/MSDialogViewController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSDialogViewController

A subclass of UIViewController that will present a view as a popover dialog.

Demo

Table of Contents

  1. Prerequisites
  2. Usage
  3. Deployment
  4. Authors
  5. License

Prerequisites

  • XCode 9

Usage

  1. Add two view controllers

  2. Add a button to the first view controller

  3. Set the class of the second view controller to DialogViewController

    Image

  4. Add a Modal Presentation segue from the button in the first view controller to the dialog view controller

  5. Disable the Animates checkbox

    Image

  6. Click on the main view of the dialog view controller

    Image

  7. Change the background color to Clear Color

    Image

  8. Click on the dialog view controller

    Image

  9. Change presentation to Over Current Context

    Image

  10. Add the dialog view you want to show in the dialog view controller and position it wherever you want

    Image

  11. Connect the mainView Outlet of the dialog view controller to the view added

    Image

  12. Run the application and click on the button. It should open the dialog view

Deployment

If you want to use the dialog view controller in your own project just copy the DialogView Folder.

Authors

  • Maher Santina - Initial work

License

This project is licensed under the MIT License - see the LICENSE.md file for details