MZFormSheetPresentationController provides an alternative to the native iOS UIModalPresentationFormSheet, adding support for iPhone and additional opportunities to setup UIPresentationController size and feel form sheet.
MIT License
973
stars
146
forks
source link
Make Form Sheet View cover percentage of entire screen #154
I want to make the form sheet cover X% of the entire screen (i.e. 80% screen width 80% screen height).
Initially I had something like this:
let transform = CGAffineTransform(scaleX: 0.8, y: 0.8)
formSheetController.presentationController?.contentViewSize = UIScreen.main.bounds.size.applying(transform)
However, the content size does not change on rotation (width, height displaying as if still in portrait mode).
I read in your README to use UILayoutFittingCompressedSize, however it returns a small box, not the entire screen. I want something that returns the full screen size, then want to apply a scale transform. I tried UILayoutFittingExpandedSize but that did not return entire screen size.
I want to make the form sheet cover X% of the entire screen (i.e. 80% screen width 80% screen height).
Initially I had something like this:
However, the content size does not change on rotation (width, height displaying as if still in portrait mode).
I read in your
README
to useUILayoutFittingCompressedSize
, however it returns a small box, not the entire screen. I want something that returns the full screen size, then want to apply a scale transform. I triedUILayoutFittingExpandedSize
but that did not return entire screen size.