Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antongaenko/UINavigationItem-Loading
Simple category to show a loading status in a navigation bar in place of left/right items or title.
https://github.com/antongaenko/UINavigationItem-Loading
Last synced: 3 months ago
JSON representation
Simple category to show a loading status in a navigation bar in place of left/right items or title.
- Host: GitHub
- URL: https://github.com/antongaenko/UINavigationItem-Loading
- Owner: antongaenko
- License: mit
- Created: 2015-01-11T12:24:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-01T07:12:40.000Z (about 10 years ago)
- Last Synced: 2024-10-31T16:24:46.622Z (3 months ago)
- Language: Objective-C
- Homepage: https://goo.gl/i4kyFi
- Size: 165 KB
- Stars: 207
- Watchers: 9
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - UINavigationItem-Loading - Simple category to show a loading status in a navigation bar in place of left/right items or title. (etc)
- awesome - UINavigationItem-Loading - Simple category to show a loading status in a navigation bar in place of left/right items or title. (etc)
README
UINavigationItem-Loading
==================================
![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)Easy way to show loading/uploading status for user in a navigation bar.
## Introduction
With needing of this pattern again I decide to make this category. So here it is, with just few methods and fully customized in color.## Demo
![NavigationBarLoaderDemo](https://raw.githubusercontent.com/Just-/demo/master/bar_loader_demo.gif)or build it yourself
`pod try UINavigationItem+Loading`
## Usage
Just import this category in your view controller (which is embed in UINavigationController).
`#import `
When you need to show loading status just call
`[self.navigationItem startAnimatingAt:ANNavBarLoaderPositionCenter];`
Left, right and center position are available. So you can also use `ANNavBarLoaderPositionLeft` or `ANNavBarLoaderPositionRight` for loader position.
When you need to stop it nothing can be more simple as`[self.navigationItem stopAnimating];`
That’s all!
To customize color for loader just set it with appearance proxy like this
`[UIActivityIndicatorView appearanceWhenContainedIn:[UINavigationBar class], nil].color = [UIColor blackColor];`
## Installation
Add the following to your [CocoaPods](http://cocoapods.org/) Podfile
`pod 'UINavigationItem+Loading', '~> 1.1'`
or clone it as a git submodule,
or just copy files
## License
All this code is available under the MIT license.
## Contact
Follow me on [Twitter](https://twitter.com/Anton_Gaenko) or [Github](https://github.com/Just-)
## More sources
You can be also interested to simplify your work with iOS keyboard [UIViewController-KeyboardAnimation](https://github.com/Just-/UIViewController-KeyboardAnimation)