To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 13.0+
- Xcode 11+
SSSwiftUILoader is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SSSwiftUILoader'
-
Import framework
import SSSwiftUILoader
-
To start the loader
-
It has default settings but you can also use custon setting if you want.
SSLoader.shared.startloader("SSLoader...", config: .defaultSettings)
-
For custom configuration below is the demo, you just need to confirm the LoaderConfiguration protocol as shown below.
struct CustomConfig: LoaderConfiguration { var loaderTextColor: Color = .blue var loaderBackgroundColor: Color = .red var loaderCornerRadius: CGFloat = 10.0 var loaderWindowColor = UIColor(red: 0.96, green: 0.96, blue: 0.96, alpha: 0.5) var activityIndicatorColor: UIColor = .blue var activityIndicatorStyle: UIActivityIndicatorView.Style = .large } SSLoader.shared.startloader(config: .customSettings(config: CustomConfig()))
-
-
To stop the loader
SSLoader.shared.stopLoader()
simformsolutions.com
SSSwiftUILoader is available under the MIT license. See the LICENSE file for more info.