PlayerView question
Closed this issue · 3 comments
Hi @LeoNatan ,
I am trying to replace this:
.popupImage(Image(song.imageName).resizable())
by:
let image = Image(song.imageName).resizable()
.popupImage(image)
to use the same image reference elsewhere.
I get the following error:
Variable used within its own initial value
What am i doing wrong, please?
Thanks,
Hello,
Not sure what you are attempting to do?
From the code you posted, you are indeed using image
while initialing it. I think you are misunderstanding what .popupImage()
actually does. It's a modifier over the View
protocol, setting a preference.
LNPopupUI/Sources/LNPopupUI/LNPopupUI.swift
Line 134 in 04c5e92
Pfff, it is an error, I made a mistake.
What I'm trying to do is get the frame of the player image (the popup content) to provide it to the popup controller which would use it while opening the popup ...
You can provide a frame, but the image on the popup bar is constant size.