Closed Austinate closed 8 years ago
I've made few debugging sessions and what i've found. In -(void)setupFormSheetViewControllerFrame happens this:
1) Form sheet is presenting another controller:
PresentedView before transition: {{37.5, 258.5}, {300, 150}}
formSheetViewControllerFrame: {{183.5, 112.5}, {300, 150}}
PresentedView after transition{{37.5, 258.5}, {300, 150}}
2) Form sheet doesn't present anything:
PresentedView before transition: {{37.5, 258.5}, {300, 150}}
formSheetViewControllerFrame: {{183.5, 112.5}, {300, 150}}
PresentedView after transition{{183.5, 112.5}, {300, 150}}
So it looks like self.presentedView.frame = [self formSheetViewControllerFrame];
doesn't affect actual presentedView frame if controller is presenting another controller.
This can be mixed issue UIAlertController and MZFormSheetPresentation i will need to check, but in the meantime check this one: https://github.com/m1entus/MZFormSheetPresentationController/blob/master/MZFormSheetPresentationController/MZFormSheetPresentationViewController.m#L50
Thanks, now i see why frame wasn't set. But, honestly, i can't get what's the purpose of ' (self.viewController.presentedViewController.modalPresentationStyle != UIModalPresentationOverFullScreen || self.viewController.modalPresentationStyle != UIModalPresentationCurrentContext || self.viewController.modalPresentationStyle != UIModalPresentationCustom)' check?
In other words, which modalPresentationStyle should i use so this will work? (in case of using any other UIViewController of course, because i don't think changing modalPresentationStyle for UIAlertController will affect anything)
Because if the modalPresentationStyle is UIModalPresentationFullScreen which is by default, there is a problem that the size of formSheet is resized to full screen, i will think about some workaround about it.
Thanks for fast reply, i think right now i'll just switch to 1.1.3 version. If i can help with something — feel free to ask. And again, thanks for help!
Sorry, that was bug from my side, it was fixed in new version which is also available on cocoapods. Thanks for issue!
Hi :) unfortunately, i've faced small issue with your awesome library.
If MZFormSheetPresentationController is presenting any controller (in my case it's alert view), than origin of it's content view is calculated wrong during transition to another size/size class.
Steps:
I see this results since MZFormSheet started to use UIPresentationController API. So here comes the question: is that me doing something wrong or we have a bug?
Thanks for help! Ping me if you will need additional info.
Sample code can be found here in master branch: https://github.com/Austinate/MZFormSheetIssueSample
Normal result:
Buggy result: