-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend popup bar past safe insets #392
Comments
Hello, Could please describe in more detail what you are trying to accomplish? |
If you have a mere view controller, and would like to have the bar extend below the safe area, you can accomplish this by adding a visual effect view under the safe area, use the provided API to return that visual effect view as the bottom docking view, and return the correct frame. LNPopupController/LNPopupController/LNPopupController/UIViewController+LNPopupSupport.h Line 239 in c946902
|
Thanks for the quick response! I've been trying to figure out how to add a visual effect view under the safe area like you said. But being rusty with iOS development, I'm not exactly sure how to do that. Am I supposed to add it programmatically to the view controller passed to I vaguely understand I want a |
You need to add the visual effect view as a sub view of your controller’s view, and position it under the bottom safe area. I think there is an issue with using autolayout (constraints), so I recommend positioning this view in your controller’s |
If you are not familiar with Objective C when reading the header files, you can look at the generated Swift interface in Xcode. |
Does this seem correct for setting up the visual effect:
And thanks so much for your help with this-- I def needed a lot of help with this one :) |
As I said, you shouldn’t use constraints. Just set the frame of the view directly. Also, creating constraints in this method is a bad idea, as it is called multiple times. |
To match the visual effect blur style to that of the popup, use the chrome material. |
Ok I'm trying to set the view position using |
You should be adding this to the view of the controller which presents the popup bar, not the content view. |
Oh so one weird thing about my implementation is that I'm presenting the popup bar via a navigation view controller that isn't directly tied to any child views or have any view of its own. Will adding a subview still work? |
Are you able to subclass the navigation controller? If so, there shouldn’t be a problem adding a view. |
Sorry, I think it can't work because the visual effect view will stay at the bottom when opening the popup content view, and its behavior will be like a bottom bar, as it is not attached to the popup bar. |
@iDevelopper That's not true. If you implement |
I did implement it in your demo project. the visual effect view become the bottom bar as I said and behave like a bottom bar. But returning another view, not the visual effect view because in this case the popup bar itself is not displayed. |
If I do not implement bottomDockingViewForPopupBar, the visual effect view acte like a bottom bar too. |
Here is a quick implementation that works well:
|
@nfiacco See above. This behaves exactly as you expect. |
Yes that did it for me, thank you so much!!! |
Behave like a bottom bar, and not working on UIViewController (without navigation controller). |
Why not? It should be the same. |
Yes! Got it. Sorry. Need to set the defaultFrameForBottomDockingView with the bottom inset of the superview in this case, if not the visualEffectView height becomes equal to 98 when the popup bar is presented (34 + 64).
|
That's odd. |
I've found another issue. Do not use the visual effect view at all, neither the bottom docking view. Just set the navigation controller toolbar hidden.
The toolbar is not completely hidden. And test with the drag option to open the popup content view. |
If you find a bug, open a new issue please. |
Ok, I will open and another issue but this bug has a lot to do with this one. |
I'm working on implementing this natively. Already have it working for |
I can't figure out how to extend the popup bar past the safe insets. I tried looking through other issues but didn't understand your proposed solution of adding a new view to dock to. Any help would be awesome!
The text was updated successfully, but these errors were encountered: