kevin-lyn / STPopup

STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.
MIT License
2.6k stars 345 forks source link

Version 1.8.4 introduced a breaking of layout for iPhones with SafeArea #125

Closed Ariandr closed 5 years ago

Ariandr commented 5 years ago

I believe it's connected to the fix https://github.com/kevin0571/STPopup/issues/102

It broke my layout, because now the root controller doesn't stick to the bottom and it creates a gap within the safe area. I believe it shouldn't be like that and it should be our job to control the layout of the root controller, because now it seems we can't stick it back to the bottom of the screen.

I also think it might have broken the behavior of many apps, so, please consider to revert it or provide a way to stick it to the bottom. If you know the way to do that by just using some properties, please let me know.

Thanks for the great library! Hope you can help me.

popController = STPopupController(rootViewController: myViewController)
let blurEffect = UIBlurEffect(style: .dark)
popController?.backgroundView = UIVisualEffectView(effect: blurEffect)
popController?.containerView.backgroundColor = UIColor.clear
popController?.style = STPopupStyle.bottomSheet
popController?.navigationBarHidden = true
popController?.present(in: self)
v_1_8_4 Screen Shot 2019-03-15 at 13 33 52
kevin-lyn commented 5 years ago

safeAreaInsets is exposed in STPopupController in 1.8.5. Set a 0 insets should avoid the gap.

Ariandr commented 5 years ago

@kevin0571 Thanks for the quick fix! Appreciate it :)

Ariandr commented 5 years ago

Hi @kevin0571 It seems you didn't push changes for the release 1.8.5. The latest changes are those ones which were done for 1.8.4.

And I updated the pod, but safeAreaInsets isn't exposed.

Screenshot at Mar 18 12-56-50 Screenshot at Mar 18 12-56-26
kevin-lyn commented 5 years ago

@Ariandr I think I failed to push it without realizing it. I've re-published 1.8.6 to fix it.

Ariandr commented 5 years ago

@kevin0571 Thanks for quick response and fix!