Since Apple doesn't provide any built-in approach to show a ViewController as modal on iPhone. The PoppableProtocol in this demo makes it possible to show any custom view controllers in modal with custom size.
- same behaviour as built-in formSheet style on iPad
- supports iPhone and iPad
- handles orientation changes
- doesn't interrupt keyboard in the presenting view controller
- custom size
- animation toggleable
- dimming view toggleable
- make your view controller adopt PoppableProtocol, implement var modalSize { get }
- just call showAsPopover() dismissAsPopover()