Coder Social home page Coder Social logo

antongaenko / uinavigationitem-loading Goto Github PK

View Code? Open in Web Editor NEW
207.0 9.0 20.0 169 KB

Simple category to show a loading status in a navigation bar in place of left/right items or title.

Home Page: https://goo.gl/i4kyFi

License: MIT License

Objective-C 93.39% Ruby 6.61%

uinavigationitem-loading's Introduction

UINavigationItem-Loading

License

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

or build it yourself

pod try UINavigationItem+Loading

Usage

Just import this category in your view controller (which is embed in UINavigationController).

#import <UINavigationItem+Loading.h>

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 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 or Github

More sources

You can be also interested to simplify your work with iOS keyboard UIViewController-KeyboardAnimation

uinavigationitem-loading's People

Stargazers

Andrew Johnson avatar  avatar LinkJin avatar  avatar KeWen avatar John Nguyen avatar Pho Hale avatar Nitish Makhija avatar Lizy avatar lixun.yang avatar Adam Hong avatar Viraj Patel avatar Andy avatar Gentear avatar  avatar chenyh2 avatar Kuyybi avatar wenbobao avatar  avatar Asad Ali avatar Allran avatar  avatar MacOMNI avatar LijunSong avatar  avatar Pranav Lathigara avatar Kai Li avatar duke avatar WindFlyCloud avatar 吃藕丑 avatar MasterBetter avatar  avatar CrazyOrange avatar krish avatar peng.wu avatar Miik avatar Ilya Medvedev avatar karthikeyan avatar Michael Galperin avatar jprothwell avatar 七 avatar Asad Ali avatar Waris Saqi avatar Tony avatar Tuan Pham avatar Sungcheol Kim avatar Mehdi Badjian avatar Francis Lata avatar Varun U avatar  avatar Yang heng avatar howekuo avatar  avatar caodongdong avatar Burak Yıldız avatar wangbo avatar 挡不住的君文 avatar changwei avatar Kubilay Erdogan avatar Jiyee Sheng avatar  avatar Miqdad Altaitoon avatar JayDaniel avatar ljpmgo avatar 赵向向 avatar Dalton avatar  avatar 小六 avatar Lasha Efremidze avatar Nick Arner avatar  avatar Fan Ye avatar Peter avatar youkiNi avatar Tom avatar sinofake avatar 张群 avatar  avatar iMacbaszii avatar Chester Liu avatar Peter avatar  avatar Phyo Min Thu avatar Florinel Gorgan avatar Mohammad Zekrallah avatar ddddddd avatar forever avatar  avatar yager avatar Mallika Damisetty avatar stevenlfg avatar cc wang avatar Eddie Chen avatar Anton Lookin avatar ArronPJ avatar Jay avatar Yevgen Sagidulin avatar  avatar  avatar Ke avatar

Watchers

mayulu avatar  avatar Anton Gaenko avatar Carabineiro avatar Johnny Xu avatar Joe Radjavitch avatar 我不会唱歌诶。 avatar Lucky_lee avatar  avatar

uinavigationitem-loading's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.