Latest 1.0.0
Homepage https://github.com/iSapozhnik/LoadingViewController
License MIT
Platforms ios 8.0
Authors

Build Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

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.

How to use

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)
    }) 
}

TODO

  • add support of UITableViewController and UICollectionViewController
  • implement NoData view, Empty view
  • fix autolayout issues
  • add pull to refresh and load more features
  • code refactoring :)

Author

Sapozhnik Ivan, [email protected]

License

LoadingViewController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "LoadingViewController",
    "version": "1.0.0",
    "summary": "LoadingViewController is a component for changing controller views: content -> loading -> content or content -> loading -> error.",
    "description": "LoadingViewController is able to switch from ContentView to LoadingView and then back to ContentView. LoadingView is represented by activity indicators of different types (just a normal UIActivityIndicatorView, spinned circles etc.)",
    "homepage": "https://github.com/iSapozhnik/LoadingViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Sapozhnik Ivan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/iSapozhnik/LoadingViewController.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "LoadingViewController/Classes/**/*",
    "resource_bundles": {
        "LoadingViewController": [
            "LoadingViewController/Assets/*.png"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This