CooperRS / RMActionController

This is an iOS control for presenting any UIView in an UIAlertController like manner
MIT License
539 stars 59 forks source link

ActionController behind TabBar on iOS < 11 #40

Closed phillippbertram closed 6 years ago

phillippbertram commented 7 years ago

Hi,

thanks for providing this control. It really makes building custom action sheets simple. Unfortunately I ran into a problem. If I am using a UITabBarController the action controller is presented behind the tab bar on the bottom.

This problem only occurs on devices lower than iOS 11 as you can see in the screenshot.

tabbar_issue

Thanks a lot an kind regards,

Phillipp

CooperRS commented 7 years ago

Hi there!

thanks for providing this control. It really makes building custom action sheets simple.

Thanks! 🙂

If I am using a UITabBarController the action controller is presented behind the tab bar on the bottom.

This probably can be solved with the view controller that is used for presenter RMActionController. Instead of the following:

[self presentViewController: animated: completion:]

you could try

[self.tabBarController presentViewController: animated: completion:]

The reason why it works in iOS 11 is that RMActionController respects the safeAreaGuide for aligning the bottom of the view. The safeAreaGuide excludes the area where the bottom bar is and RMActionController is presented correctly.

Best regards, Roland

phillippbertram commented 6 years ago

Thanks for the fast reply, that will solve my problem.