To run the example project, clone the repo, and run pod install
from the Example directory first.
LoadingViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "LoadingViewController"
UITableViewController and UICollectionViewController are not supported yet.
Subclass your controller from LoadingViewController. On the top of View of your controller put another UIView which will be content view. All your content should be on the top of Content view. Link contentView property with this newly created view.
override func viewDidLoad() {
super.viewDidLoad()
setVisibleScreen(.Loading)
APIService.fetchSomeData({ response in
// Update UI
self.setVisibleScreen(.Content)
})
}
- add support of UITableViewController and UICollectionViewController
- implement NoData view, Empty view
- fix autolayout issues
- add pull to refresh and load more features
- code refactoring :)
Sapozhnik Ivan, sapozhnik.ivan@gmail.com
LoadingViewController is available under the MIT license. See the LICENSE file for more info.