https://github.com/yzhong52/modalpresentationstyledemo
UIModalPresentationStyle Demo
https://github.com/yzhong52/modalpresentationstyledemo
Last synced: 6 months ago
JSON representation
UIModalPresentationStyle Demo
- Host: GitHub
- URL: https://github.com/yzhong52/modalpresentationstyledemo
- Owner: yzhong52
- Created: 2017-08-13T04:08:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-01T15:04:19.000Z (over 5 years ago)
- Last Synced: 2025-03-20T16:52:40.124Z (7 months ago)
- Language: Swift
- Size: 26.1 MB
- Stars: 49
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Modal Presentation Style Demo
In this demo app, there are three view controllers:
* **Initial View Controller**
* **Presenting View Controller**
* **Presented View Controller**
![]()
At app lauch, **Presenting View Controller** is presented on top of **Initial View Controller** with a `formSheet` style. From **Presenting View Controller**, there are a list of buttons that will open **Presented View Controller** with different style options. The background of **Presented View Controller** has a 50% transparency so that we can see through it in some styles.
The best way to understand the difference between them is to run the app in an iPad simulator since some of the styles are identical in iPhone. Below are some examples:
* **Current Context** v.s. **Over Current Context**.
![]()
![]()
* **Full Screen** v.s. **Over Full Screen**
![]()
![]()
* **Page Sheet** v.s. **Pop Over** v.s. **Form Sheet**
![]()
![]()
![]()