⏳ AKProcessIndicator
It provides a Network Indicator for device that have a Safe Area.
This library was created by inheriting the wonderful animation of FTLinearActivityIndicator. Since it does not use deprecated isNetworkActivityIndicatorVisible
, it can be used with confidence even in the latest environment.
Installation
CocoaPods
# Podfile
use_frameworks!
target 'YOUR_TARGET_NAME' do
pod 'AKProcessIndicator'
end
Replace YOUR_TARGET_NAME and then, in the Podfile directory, type:
$ pod install
Carthage
Add this to Cartfile
.
# Cartfile
github "AkkeyLab/AKProcessIndicator"
Run this script to install it.
$ carthage update --platform iOS
Usage
Please import AKProcessIndicator.
import AKProcessIndicator
If you want to use this, you must always perform the setup process immediately after startup.
I recommend writing the following process in application(_:didFinishLaunchingWithOptions:) / scene(_:willConnectTo:options:) called by AppDelegate or SceneDelegate.
If this is executed on a device other than iPhoneX / iPhoneXS / iPhoneXS Max / iPhoneXR / iPhone11 Pro / iPhone11 Pro Max / iPhone11, the processing in the method will be skipped.
UIApplication.shared.setupProcessIndicatorIfNeeded()
After that, it is possible to switch the display / non-display of Process Indicator by switching the flag.
UIApplication.shared.isLoading = true
Requirements
env | version |
---|---|
Swift | 5.x |
Xcode | 11.x |
iOS | 11.0 |
License
AKProcessIndicator is available under the MIT license. See the LICENSE file for more info.