changeset 382:dc48cf87ded9

Delete HelperView
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 24 Apr 2021 00:41:08 +0200
parents 555a79e5e8c4
children 5d7a66e2b39f
files LazyBear/Views/Global Helpers/BackgroundShadow.swift LazyBear/Views/Global Helpers/BlurBackground.swift LazyBear/Views/Global Helpers/RenameAction.swift LazyBear/Views/Search/Helpers/HelpSheet.swift
diffstat 4 files changed, 20 insertions(+), 138 deletions(-) [+]
line wrap: on
line diff
--- a/LazyBear/Views/Global Helpers/BackgroundShadow.swift	Fri Apr 23 08:46:44 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-//
-//  BackgroundShadow.swift
-//  LazyBear
-//
-//  Created by Dennis Concepción Martín on 3/4/21.
-//
-
-import SwiftUI
-
-struct BackgroundShadow: View {
-    @EnvironmentObject var hudManager: HudManager
-    
-    var body: some View {
-        Color(.black)
-            .edgesIgnoringSafeArea(.all)
-            .opacity(hudManager.showSearchHelper ? 0.2: 0)
-            .animation(.easeInOut)
-            .onTapGesture { hudManager.showSearchHelper = false }
-    }
-}
-
-struct BackgroundShadow_Previews: PreviewProvider {
-    static var previews: some View {
-        BackgroundShadow()
-            .environmentObject(HudManager())
-    }
-}
--- a/LazyBear/Views/Global Helpers/BlurBackground.swift	Fri Apr 23 08:46:44 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-//
-//  BlurBackground.swift
-//  LazyBear
-//
-//  Created by Dennis Concepción Martín on 3/4/21.
-//
-
-import SwiftUI
-
-struct BlurBackground: UIViewRepresentable {
-    var style: UIBlurEffect.Style
-    
-    func makeUIView(context: Context) -> UIVisualEffectView {
-        return UIVisualEffectView(effect: UIBlurEffect(style: style))
-    }
-    
-    func updateUIView(_ uiView: UIVisualEffectView, context: Context) {
-        uiView.effect = UIBlurEffect(style: style)
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Views/Global Helpers/RenameAction.swift	Sat Apr 24 00:41:08 2021 +0200
@@ -0,0 +1,20 @@
+//
+//  RenameAction.swift
+//  LazyBear
+//
+//  Created by Dennis Concepción Martín on 24/4/21.
+//
+
+import SwiftUI
+
+struct RenameAction: View {
+    var body: some View {
+        Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
+    }
+}
+
+struct RenameAction_Previews: PreviewProvider {
+    static var previews: some View {
+        RenameAction()
+    }
+}
--- a/LazyBear/Views/Search/Helpers/HelpSheet.swift	Fri Apr 23 08:46:44 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-//
-//  HelpSheet.swift
-//  LazyBear
-//
-//  Created by Dennis Concepción Martín on 3/4/21.
-//
-
-import SwiftUI
-
-struct HelpSheet: View {
-    @Environment(\.colorScheme) var colorScheme
-    @EnvironmentObject var hudManager: HudManager
-    
-    var body: some View {
-        VStack {
-            HStack {
-                Spacer()
-                Button(action: { hudManager.showSearchHelper = false }) {
-                    Image(systemName: "multiply.circle")
-                        .imageScale(.large)
-                }
-            }
-            
-            Group {
-                Text("How to search a company?")
-                    .font(.headline)
-                
-                Text("Just tap on the search bar and type the company name or stock symbol. You'll see rows like this: ")
-                    .multilineTextAlignment(.leading)
-                
-                TutorialRow()
-                
-                let explanation = "The left side shows you the stock symbol, and the company name. The right side shows you the quote currency, and in what region the stock is trading."
-                
-                Text(explanation)
-                    .multilineTextAlignment(.leading)
-            }
-            .padding(.bottom)
-
-        }
-        .padding()
-        .background(
-            ZStack {
-                BlurBackground(style: .systemMaterial)
-                    .clipShape(RoundedRectangle(cornerRadius: 25))
-                
-                RoundedRectangle(cornerRadius: 25)
-                    .foregroundColor(colorScheme == .dark ? Color(.secondarySystemBackground): .white)
-                    .shadow(color: Color.black.opacity(0.2), radius: 10, x: 0.0, y: 5)
-            }
-        )
-    }
-}
-
-struct HelpSheet_Previews: PreviewProvider {
-    static var previews: some View {
-        HelpSheet()
-            .environmentObject(HudManager())
-    }
-}
-
-
-struct TutorialRow: View {
-    @Environment(\.colorScheme) var colorScheme
-    
-    var body: some View {
-        RoundedRectangle(cornerRadius: 10)
-            .frame(height: 55)
-            .foregroundColor(colorScheme == .dark ? Color(.tertiarySystemBackground): Color(.secondarySystemBackground))
-            .overlay(
-                HStack {
-                    VStack {
-                        Text("AAPL")
-                            .fontWeight(.semibold)
-                        
-                        Text("Apple Inc")
-                    }
-                    
-                    Spacer()
-                    
-                    VStack {
-                        Text("USD")
-                            .fontWeight(.semibold)
-                        
-                        Text("US")
-                    }
-                }
-                .padding()
-            )
-    }
-}