Closed caffeineflo closed 5 years ago
Yes, this is a use case that I didn't contemplate. It happens when the panel is reused to be shown/dismissed. I have a solution in mind, I will push a fix this weekend. Thanks for reporting 👍
Please @caffeineflo, reopen if you still have problems
I'll try it tomorrow morning and report back. Thanks for the quick turnaround!
@antoniocasero I might be missing some configuration to make this work. But when I click the panel now, it won't scroll up... I'll add a gif to it that makes it more clear
Some example code would be perfect
Sent from my iPhone
On 29. Oct 2018, at 22:19, Florian Harr notifications@github.com wrote:
@antoniocasero I might be missing some configuration to make this work. But when I click the panel now, it won't scroll up... I'll add a gif to it that makes it more clear
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I instantiate the panel with the VC, so e.g. let panel = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Panel") as! PanelClass
(PanelClass conforms to Panelable). Now on didSelect
I show the panel and on didDescelect
I dismiss the panel.
See gif for the behavior this ends up giving me
Sorry I can not reproduce this issue. Maybe some missing values in the PanelConfiguration?
Could you check what is the value
in the method -movePanel(_:) when you tap on the panel?
The premise is relatively simple, looking at https://github.com/antoniocasero/Panels/blob/master/Sources/Panels.swift#L50 the safeAreaBottom is added to the PanelHeightConstraint every time show is being executed.
Now in my specific use case, I instantiate the Panelable VC with my parent VC and only show the Panel on didSelect, I dismiss it on didDeselect. With this behavior, the headerHeigh grows every time I execute
show
which ends up pushing my header further down each time. The examples show the same behavior (although, it's constraints break and recovery recovers the correct constraints).