iPhones with a notch 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 on the following devices:
- iPhone X
- iPhone Xs
- iPhone Xs Max
- iPhone Xʀ
- iPhone 11
- iPhone 11 Pro
- iPhone 11 Pro Max
- iPhone 12
- iPhone 12 mini
- iPhone 12 Pro
- iPhone 12 Pro Max
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).
As a fix for the system network activity indicator
In your app delegate's
didFinishLaunching method, after initializing the window, just call
Then, use the standard network activity indicator as usual.
As a standalone view
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
tintColor is supported to colorize the indicator gradient.
To open an example project, just call
pod try FTLinearActivityIndicator on the command line.
Written in Swift 5. Should run under any iOS (obviously, the iPhone X requires iOS 11 or higher).
FTLinearActivityIndicator is available through CocoaPods. To install it, simply add the following line to your Podfile:
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.