Closed MarvinNazari closed 7 years ago
The default implementation of the StatefulViewController
protocol uses the UIViewController's view as its backingView
. I usually just add the UITableView to the view so I haven't personally run into this issue.
You can, however, always override the backingView
property and return a custom view where the placeholder views should be added.
This might be able to be fixed by using the ContainerViewStateMachine
implementation from PR #29 as the default implementation for all view controllers.
It seems that, in order to handle odd little corner cases like this, it is safer to use a privately managed container view, rather than relying on the view
of the UIViewController
.
In fact, rather than adding the views for the states to the backingView
it may be better to do a transition FROM the view
of the controller to our state view and then back.
I've pushed some changes to master that allow for better support of UITableViewController and UICollectionViewController (thanks @AnthonyMDev). @MarvinNazari Please take a look and report any issues. Thanks! ✌️
Hi Awesome project, but we have an issue when the view of the UIViewController is an UITableview (example below)
so it adds the loadingView/emptyView inside of the tableView