blob: 5b160fd1dbe415b5fd1fb0af7df982106277dc02 (
plain) (
blame)
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
|
//
// ActivityIndicator.swift
// tst
//
// Created by Vitaly Takmazov on 10.12.2019.
// Copyright © 2019 com.juick. All rights reserved.
//
import Foundation
import SwiftUI
struct ActivityIndicator: UIViewRepresentable {
let style: UIActivityIndicatorView.Style
func makeUIView(context: UIViewRepresentableContext<ActivityIndicator>) -> UIActivityIndicatorView {
return UIActivityIndicatorView(style: style)
}
func updateUIView(_ uiView: UIActivityIndicatorView, context: UIViewRepresentableContext<ActivityIndicator>) {
uiView.startAnimating()
}
}
struct ActivityIndicator_Previews: PreviewProvider {
static var previews: some View {
/*@START_MENU_TOKEN@*/Text("Hello, World!")/*@END_MENU_TOKEN@*/
}
}
|