Code Monkey home page Code Monkey logo

ftlinearactivityindicator's Introduction

FTLinearActivityIndicator

Version License Platform Twitter

iPhone X, XS, and XR don't display the network activity indicator anymore. This framework brings it back by placing an activity indicator in the upper right of the screen on top of the regular status bar items.

Since a circular indicator wouldn't fit, a rectangular KITT scanner-like indicator with a gradient is shown. The indicator UI can be used standalone or as a "fix" for the iOS network activity indicator (using the existing API).

Integration

As a fix for the system network activity indicator

In your app delegate's didFinishLaunching method, after initializing the window, just call

UIApplication.configureLinearNetworkActivityIndicatorIfNeeded()

Then, use the standard network activity indicator as usual.

As a standalone view

Include a FTLinearActivityIndicator view in your storyboard or instantiate it from code. The class supports the following methods and properties, using a similar API as the iOS UIActivityIndicatorView:

  • startAnimating()
  • stopAnimating()
  • isAnimating: Bool
  • hidesWhenStopped: Bool

tintColor is supported to colorize the indicator gradient.

Example

To open an example project, just call pod try FTLinearActivityIndicator on the command line.

Requirements

Written in Swift 4.2. Should run under any iOS (obviously, the iPhone X requires iOS 11 or higher).

Installation

FTLinearActivityIndicator is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'FTLinearActivityIndicator'

If you need to use Swift 4.0, please use the swift-4.0 branch:

pod 'FTLinearActivityIndicator', :git => '[email protected]:futuretap/FTLinearActivityIndicator.git', :branch => 'swift-4.0'

Author

Ortwin Gentz, FutureTap GmbH, Twitter: @ortwingentz

License

FTLinearActivityIndicator is available under the CC-BY-SA 4.0 license. You may copy and redistribute, adapt and build upon the framework for any purpose, even commercially, as long as you give credit to me in the About menu or a similar place in the app.

ftlinearactivityindicator's People

Contributors

futuretap avatar rolandleth avatar tomlokhorst avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.