Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Issue with restoring pinned and floating panels #15

Closed
barrettj opened this issue Nov 30, 2017 · 2 comments
Closed

Issue with restoring pinned and floating panels #15

barrettj opened this issue Nov 30, 2017 · 2 comments

Comments

@barrettj
Copy link

I'm not sure if this is due to how my project is set up, but I can't seem to have restoration work when there is both a pinned and a floating panel.

I'm calling my restorePanelStatesFromDisk() in viewWillAppear because if a panel is pinned I want it to be there as the view is being presented. This doesn't seem to display floating panels, though.

Calling restorePanelStatesFromDisk() in viewDidAppear seems to display floating panels fine, but causes pinned panels to suddenly appear instead of being there from the initial display animation.

I've tried calling restorePanelStatesFromDisk() in both, but this causes pinned panels to be there at the start but then disappear.

Any insights into what I might be doing wrong?

Thanks!

@louisdh
Copy link
Owner

louisdh commented Dec 2, 2017

Just checked in Pixure, and I call restorePanelStatesFromDisk() from viewDidLoad. It's safe to do since the layout of the panels is done entirely with Auto Layout. When restoring the states of your panels, can you check if your manager returns true for allowFloatingPanels and allowPanelPinning?

@barrettj
Copy link
Author

barrettj commented Dec 2, 2017

After moving restorePanelStatesFromDisk to just being called in viewDidLoad everything seems to be working as expected (allow pinning and floating were both always true). Not sure where I got the idea to do willAppear from instead of didLoad from.

Thanks!

@louisdh louisdh closed this as completed Dec 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants