mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
26 lines
676 B
Swift
26 lines
676 B
Swift
//
|
|
// ActivityIndicator.swift
|
|
// Multisig
|
|
//
|
|
// Created by Dmitry Bespalov on 23.04.20.
|
|
// Copyright © 2020 Gnosis Ltd. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
import UIKit
|
|
|
|
struct ActivityIndicator: UIViewRepresentable {
|
|
@Binding
|
|
var isAnimating: Bool
|
|
|
|
let style: UIActivityIndicatorView.Style
|
|
|
|
func makeUIView(context: UIViewRepresentableContext<ActivityIndicator>) -> UIActivityIndicatorView {
|
|
return UIActivityIndicatorView(style: style)
|
|
}
|
|
|
|
func updateUIView(_ uiView: UIActivityIndicatorView, context: UIViewRepresentableContext<ActivityIndicator>) {
|
|
isAnimating ? uiView.startAnimating() : uiView.stopAnimating()
|
|
}
|
|
}
|