summaryrefslogtreecommitdiff
path: root/Juick/Views/ActivityIndicator.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Views/ActivityIndicator.swift')
-rw-r--r--Juick/Views/ActivityIndicator.swift28
1 files changed, 28 insertions, 0 deletions
diff --git a/Juick/Views/ActivityIndicator.swift b/Juick/Views/ActivityIndicator.swift
new file mode 100644
index 0000000..5b160fd
--- /dev/null
+++ b/Juick/Views/ActivityIndicator.swift
@@ -0,0 +1,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@*/
+ }
+}