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

Add support for 'UITableViewController' #29

Closed
wants to merge 3 commits into from

Conversation

AnthonyMDev
Copy link

@AnthonyMDev AnthonyMDev commented Jun 24, 2016

This works by creating a new ViewStateMachine subclass that manages a container view. The views for each state are added to this container view and this container view is added to the UITableViewController.view. When the state is set to .Content, the container view is removed from its superview, but retained by the state machine.

No public APIs have been broken by this PR and the fix works automatically without any new code having to be implemented by the end user.
Documentation for all new public classes, and properties has been provided.
The demo project has been updated to use a UITableViewController to demonstrate this. It works exactly as expected in all scenarios.

This PR closes #19.

Please let me know if you have any questions about my implementation.

@AnthonyMDev AnthonyMDev mentioned this pull request Oct 27, 2016
@jaimeagudo
Copy link

Thanks guys, any news on this?

@AnthonyMDev
Copy link
Author

I haven't heard anything on this in a while. Hoping to see it pulled in soon though.

I've also suggested a different possible solution in #31 that may solve this issue alongside the issue in that ticket. So that may be a good alternative.

@eyeezzi
Copy link

eyeezzi commented Mar 8, 2017

@AnthonyMDev, great work on this PR, It appears this is not getting merged anytime soon (its being 9 months already), so do you know of a way I could use your branch in my podfile?

@AnthonyMDev
Copy link
Author

@eyeezzi Thanks. I would suggest you make your own fork and then merge my branch into your fork. You can then have your Podfile use your fork like this.

pod 'StatefulViewController', :git => 'https://github.com/eyeezzi/StatefulViewController.git', :branch => 'master'

@aschuch
Copy link
Owner

aschuch commented May 16, 2017

😎 Thanks for the PR.
I've incorporated some of your ideas but made a lot of changes to add this workaround directly into the ViewStateMachine. I've also added support for UICollectionViewController.
However, since the UITableViewController's view is identical to the UITableViewController's tableView, the placeholder views can always be scrolled. This needs to be addressed inside the UITableViewController subclass if that behaviour is not intended.
Please take a look at master to see everything in action!

@aschuch aschuch closed this May 16, 2017
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.

Not working on a UITableViewController
4 participants