-
Notifications
You must be signed in to change notification settings - Fork 1
/
CustomLoadingIndicator.swift
58 lines (45 loc) · 1.15 KB
/
CustomLoadingIndicator.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// CustomLoadingIndicator.swift
// GiniCaptureSDKExample
//
// Created by David Vizaknai on 14.09.2022.
// Copyright © 2022 Gini GmbH. All rights reserved.
//
import UIKit
import GiniCaptureSDK
public final class CustomLoadingIndicator: UIActivityIndicatorView, CustomLoadingIndicatorAdapter {
public func startAnimation() {
self.startAnimating()
}
public func stopAnimation() {
self.stopAnimating()
}
public func injectedView() -> UIView {
if #available(iOS 13.0, *) {
self.style = .large
}
self.color = .blue
self.startAnimating()
return self
}
public func onDeinit() {
}
}
public final class OnButtonLoading: UIActivityIndicatorView, OnButtonLoadingIndicatorAdapter {
public func startAnimation() {
self.startAnimating()
}
public func stopAnimation() {
self.stopAnimating()
}
public func injectedView() -> UIView {
if #available(iOS 13.0, *) {
self.style = .large
}
self.color = .red
self.startAnimating()
return self
}
public func onDeinit() {
}
}