changeset 344:276e17f11c19

Add placeholder Image SearchView
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Wed, 07 Apr 2021 16:40:53 +0200
parents ab909fc9ce55
children fde2b30c719e
files LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate LazyBear/Assets.xcassets/Themes/default.colorset/Contents.json LazyBear/Assets.xcassets/Vectors/Contents.json LazyBear/Assets.xcassets/Vectors/bearSleeping.imageset/Contents.json LazyBear/Assets.xcassets/Vectors/bearSleeping.imageset/bearSleeping.png LazyBear/Assets.xcassets/Vectors/bearSleeping.imageset/bearSleeping@2x.png LazyBear/Assets.xcassets/Vectors/bearSleeping.imageset/bearSleeping@3x.png LazyBear/Views/Search/SearchView.swift
diffstat 8 files changed, 50 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
Binary file LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed
--- a/LazyBear/Assets.xcassets/Themes/default.colorset/Contents.json	Tue Apr 06 11:04:21 2021 +0200
+++ b/LazyBear/Assets.xcassets/Themes/default.colorset/Contents.json	Wed Apr 07 16:40:53 2021 +0200
@@ -5,9 +5,9 @@
         "color-space" : "srgb",
         "components" : {
           "alpha" : "1.000",
-          "blue" : "0.996",
-          "green" : "0.729",
-          "red" : "0.290"
+          "blue" : "254",
+          "green" : "186",
+          "red" : "74"
         }
       },
       "idiom" : "universal"
@@ -23,9 +23,9 @@
         "color-space" : "srgb",
         "components" : {
           "alpha" : "1.000",
-          "blue" : "0.620",
-          "green" : "0.267",
-          "red" : "0.098"
+          "blue" : "158",
+          "green" : "68",
+          "red" : "25"
         }
       },
       "idiom" : "universal"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Vectors/Contents.json	Wed Apr 07 16:40:53 2021 +0200
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Vectors/bearSleeping.imageset/Contents.json	Wed Apr 07 16:40:53 2021 +0200
@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "bearSleeping.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "bearSleeping@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "bearSleeping@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
Binary file LazyBear/Assets.xcassets/Vectors/bearSleeping.imageset/bearSleeping.png has changed
Binary file LazyBear/Assets.xcassets/Vectors/bearSleeping.imageset/bearSleeping@2x.png has changed
Binary file LazyBear/Assets.xcassets/Vectors/bearSleeping.imageset/bearSleeping@3x.png has changed
--- a/LazyBear/Views/Search/SearchView.swift	Tue Apr 06 11:04:21 2021 +0200
+++ b/LazyBear/Views/Search/SearchView.swift	Wed Apr 07 16:40:53 2021 +0200
@@ -20,11 +20,21 @@
                 if showingSearchList {
                     CompanyList(searchResult: searchData.searchResult)
                 } else {
-                    Text("Are you looking for something? 👀")
-                        .fontWeight(.semibold)
-                    
-                    Text("Use the search bar to find a company")
-                    Text(searchedText)
+                    VStack(alignment: .center) {
+                        Image("bearSleeping")
+                            .resizable()
+                            .scaledToFit()
+                        
+                        Text("Are you looking for something?")
+                            .font(.title2)
+                            .fontWeight(.semibold)
+                            .multilineTextAlignment(.center)
+                            .padding(.bottom)
+                        
+                        Text("Use the search bar to find your favourite company. Type the stock symbol or name, we'll find it!")
+                            .multilineTextAlignment(.center)
+                    }
+                    .padding(.horizontal)
                 }
             }
             .onDisappear { self.searchedText = ""; self.showingSearchList = false }