DrawerView icon indicating copy to clipboard operation
DrawerView copied to clipboard

Attach drawer below specific view

Open denandreychuk opened this issue 5 years ago • 4 comments

Hello @mkko! I have a question. Is it possible to insert drawer below specific view?

I have UITabBarController with some items inside it. I want to present drawer below UITabBar but on front of my UIViewControllers.

denandreychuk avatar May 06 '20 17:05 denandreychuk

Hi! DrawerView acts like an ordinary view, so would it be possible to reorder view hierarchy and put it behind the tab bar? I haven't played with tab bar much, so I can't say from the top of my head.

mkko avatar May 11 '20 19:05 mkko

We only have bringSubviewToFront and sendSubviewToBack. But I need to insert drawer at specific position (insertSubview(_:belowSubview:)).

I think it would be nice, if DrawerView will allows us to manually insert it into view hierarchy and then just call some type of setup method to configure all internal constraints and other stuff. attachTo not flexible enough.

denandreychuk avatar May 11 '20 19:05 denandreychuk

Would it work for you if there's overload for attachTo to specify the order in a more flexible way? Something like attachTo(view: UIView, belowSubview: UIView? = nil)?

mkko avatar May 12 '20 06:05 mkko

Yes, it should work.

denandreychuk avatar May 14 '20 22:05 denandreychuk