Skip to content

Sylvia-YiyinShen/CustomModalDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

CustomModalDemo

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.

Features

  1. same behaviour as built-in formSheet style on iPad
  2. supports iPhone and iPad
  3. handles orientation changes
  4. doesn't interrupt keyboard in the presenting view controller
  5. custom size
  6. animation toggleable
  7. dimming view toggleable

Pretty simple to use

  1. make your view controller adopt PoppableProtocol, implement var modalSize { get }
  2. just call showAsPopover() dismissAsPopover()

modal

About

A custom modal presenter for iPhone and iPad

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages