Skip to content
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

Fix show segue problem #21

Merged
merged 1 commit into from
Nov 2, 2018
Merged

Fix show segue problem #21

merged 1 commit into from
Nov 2, 2018

Conversation

scenee
Copy link
Owner

@scenee scenee commented Oct 30, 2018

Fix #20

FloatingPanelController.show(_:sender) is confusing. I don’t expect to work Show segues from a floating panel and I don't think it should work. So I'd like to deprecate the method on this PR, and replace it with FloatingPanelController.set(contentViewController:). The change is planning to be merged into v1.2.0.

- fpc.show(contentVC, sender: nil)
+ fpc.set(contentViewController: contentVC)

If you use "Show" or "Show Detail" segue from a floating panel, it will raise a fatal error.

"Show" or "Show Detail" segue from a content VC of a floating panel will be handled by a view controller managing a floating panel.

Finally, FloatingPanelController.set(contentViewController:) might be updated to FloatingPanelController.set(contentViewController:animated:) to replace a content view with an animation.

@scenee scenee mentioned this pull request Oct 30, 2018
@scenee scenee force-pushed the fix-show-segue-problem branch 2 times, most recently from a184b59 to 514c3c9 Compare October 31, 2018 02:10
@scenee
Copy link
Owner Author

scenee commented Oct 31, 2018

Well, I'm thinking now. It might be better for FloatingPanelController to handle show(_:sender) to show a secondary floating panel for decoupling the need to display a view controller from the process of actually presenting a floating panel.

@scenee scenee force-pushed the fix-show-segue-problem branch 3 times, most recently from 5ab6d8a to 392700c Compare November 1, 2018 01:57
@scenee
Copy link
Owner Author

scenee commented Nov 1, 2018

Now you can handle 'Show' segue to show a secondary floating panel. See "'Show' or 'Show Detail' Segues" note in README for detail.

@scenee scenee force-pushed the fix-show-segue-problem branch 3 times, most recently from 55f124b to b654f86 Compare November 2, 2018 00:53
…iewController:)

And add a sample code to test show(_:sender:) in ContentVC.

`FloatingPanelController.show(_:sender:)` can block 'Show' segue in a
content view controller. 'Show' segue should not be handled by
'FloatingPanelController`. So I replace this method.
@scenee scenee force-pushed the fix-show-segue-problem branch from b654f86 to 0cf0f42 Compare November 2, 2018 01:33
@scenee scenee merged commit 2b483e6 into master Nov 2, 2018
@scenee scenee deleted the fix-show-segue-problem branch November 2, 2018 03:12
dscyrescotti pushed a commit to dscyrescotti/FloatingPanel that referenced this pull request Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant