LeoNatan / LNPopupUI

A SwiftUI library for presenting views as popups, much like the Apple Music and Podcasts apps.
MIT License
320 stars 29 forks source link

Change color of now playing bar background #10

Closed lmick002 closed 2 years ago

lmick002 commented 2 years ago

Hey. Thanks for the great swift UI package! Ive been trying to update the background color of the now playing bar, it seems to only show gray behind a custom not playing bar. I've used .popupBarBackgroundEffect(nil) .popupBarBackgroundStyle(nil)

But neither have changed the background color (Ideally to clear)

Thanks!

LeoNatan commented 2 years ago

Hello, I need more information. What view are you presenting the popup on? If a tab view or a navigation view (with a toolbar), the bar inherits appearance from the bottom view. You need to disable that, then change the appearance of the popup.

LeoNatan commented 2 years ago

Check out the customization in the example project.

lmick002 commented 2 years ago

Here's a screen capture of the simulator. Its the gray (I believe blureffects view) that shows on drag. https://user-images.githubusercontent.com/11696955/132367707-3cbd863d-34cd-4f86-92c8-a567abbe2928.mp4

LeoNatan commented 2 years ago

You can try something like the following:

.popupBarInheritsAppearanceFromDockingView(false)
.popupBarCustomizer { popupBar in
    popupBar.standardAppearance.configureWithOpaqueBackground()
    popupBar.standardAppearance.backgroundColor = .white
}
lmick002 commented 2 years ago

Worked perfect - Thanks!