futuretap/ftlinearactivityindicator
Since iOS 18, network activity indicator is no longer displayed. iPhones with a notch or Dynamic Island
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: BoolhidesWhenStopped: Bool
tintColor is supported to colorize the indicator gradient.
Requirements
- iOS 12 or higher (iOS 11 is supported until version 1.6)
- compiles for Mac Catalyst or visionOS (without network activity indicator)
Installation
FTLinearActivityIndicator is available through Swift Package Manager or CocoaPods.
Swift Package Manager
To install FTLinearActivityIndicator using Swift Package Manager you can follow the tutorial published by Apple using the URL for the FTLinearActivityIndicator repo with the current version:
- In Xcode, select “File” → “Add Packages…”
- Enter
https://github.com/futuretap/FTLinearActivityIndicator.git
CocoaPods
To install FTLinearActivityIndicator via CocoaPods, add the following line to your Podfile:
pod 'FTLinearActivityIndicator'Then run pod install.
To open an example project, just call pod try FTLinearActivityIndicator on the command line.
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. If you need a different license without attribution requirement, please contact me and we can work something out.
Sponsors wanted
If you would like to support my Open Source work, consider joining me as a sponsor! 💪️ Your sponsorship enables me to spend more time on this and other community projects. Thank you!
Package Metadata
Repository: futuretap/ftlinearactivityindicator
Default branch: master
README: README.md