From 955b0e900657210e2c4d723be115743f98e6983d Mon Sep 17 00:00:00 2001 From: Duncan Kent Date: Fri, 1 Sep 2023 12:23:20 +0100 Subject: [PATCH 1/7] Add external maps application functionality --- .../GuideDogs/Assets/PropertyLists/Info.plist | 1 + .../UIAlertController+Extensions.swift | 58 +++++++++++++++++++ .../ExpandableMapViewController.swift | 12 +--- 3 files changed, 62 insertions(+), 9 deletions(-) diff --git a/apps/ios/GuideDogs/Assets/PropertyLists/Info.plist b/apps/ios/GuideDogs/Assets/PropertyLists/Info.plist index f4179354..e75e4b75 100644 --- a/apps/ios/GuideDogs/Assets/PropertyLists/Info.plist +++ b/apps/ios/GuideDogs/Assets/PropertyLists/Info.plist @@ -54,6 +54,7 @@ LSApplicationQueriesSchemes + comgooglemaps googlegmail ms-outlook ymail diff --git a/apps/ios/GuideDogs/Code/App/Framework Extensions/UI Class Extensions/UIAlertController+Extensions.swift b/apps/ios/GuideDogs/Code/App/Framework Extensions/UI Class Extensions/UIAlertController+Extensions.swift index efa5af41..2af13069 100644 --- a/apps/ios/GuideDogs/Code/App/Framework Extensions/UI Class Extensions/UIAlertController+Extensions.swift +++ b/apps/ios/GuideDogs/Code/App/Framework Extensions/UI Class Extensions/UIAlertController+Extensions.swift @@ -7,6 +7,7 @@ // import Foundation +import CoreLocation enum MailClient: String, CaseIterable { @@ -43,6 +44,33 @@ enum MailClient: String, CaseIterable { } } +enum MapsApp: String, CaseIterable { + case apple + case google + case waze + + static let defaultMapZoom: Int = 10 + + var localizedTitle: String { + switch self { + case .apple: return "Apple Maps" + case .google: return "Google Maps" + case .waze: return "Waze" + } + } + + func url(for location: CLLocation, name: String) -> URL? { + switch self { + case .apple: + return URL(string: "https://maps.apple.com/?q=\(location.coordinate.latitude.roundToDecimalPlaces(2)),\(location.coordinate.longitude.roundToDecimalPlaces(2))&ll=\(location.coordinate.latitude),\(location.coordinate.longitude)&z=\(MapsApp.defaultMapZoom)&t=s") + case .google: + return URL(string: "https://www.google.com/maps/search/?api=1&query=\(location.coordinate.latitude)%2C\(location.coordinate.longitude)") + case .waze: + return URL(string: "https://www.waze.com/ul?ll=\(location.coordinate.latitude)%2C\(location.coordinate.longitude)&zoom=\(MapsApp.defaultMapZoom)") + } + } +} + extension UIAlertController { /// Create and return a `UIAlertController` that is able to send an email with external email clients convenience init(email: String, subject: String, preferredStyle: UIAlertController.Style, handler: ((MailClient?) -> Void)? = nil) { @@ -71,4 +99,34 @@ extension UIAlertController { self.addAction(UIAlertAction(title: GDLocalizedString("general.alert.cancel"), style: .cancel, handler: nil)) } + + /// Create and return a `UIAlertController` that is able to open a map location in an external maps app + convenience init(locationDetail: LocationDetail, preferredStyle: UIAlertController.Style, handler: ((MapsApp?) -> Void)? = nil) { + + // Create alert actions for each support maps application + let actions = MapsApp.allCases.compactMap { (mapApp) -> UIAlertAction? in + guard let url = mapApp.url(for: locationDetail.location, name: locationDetail.displayName) else { + return nil + } + return UIAlertAction(title: mapApp.localizedTitle, url: url) { + handler?(mapApp) + } + } + + if actions.isEmpty { + self.init(title: GDLocalizedString("general.error.error_occurred"), + message: "No maps app installed", + preferredStyle: .alert) + } else { + self.init(title: GDLocalizedString("general.alert.choose_an_app"), + message: nil, + preferredStyle: preferredStyle) + + actions.forEach({ action in + self.addAction(action) + }) + } + + self.addAction(UIAlertAction(title: GDLocalizedString("general.alert.cancel"), style: .cancel, handler: nil)) + } } diff --git a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/Location Detail/ExpandableMapViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/Location Detail/ExpandableMapViewController.swift index 61a08436..8501a3ba 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/Location Detail/ExpandableMapViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/Location Detail/ExpandableMapViewController.swift @@ -286,15 +286,9 @@ class ExpandableMapViewController: UIViewController { } if let locationDetail = locationDetail { - // Create and configure the alert controller. - let alert = UIAlertController(title: GDLocalizedString("general.alert.choose_an_app"), message: nil, preferredStyle: .actionSheet) - - // TODO: Add actions to open the given location in a third-party map application - // These applications must also be defined in 'Queried URL Schemes' in Info.plist - - let cancelAction = UIAlertAction(title: GDLocalizedString("general.alert.cancel"), style: .cancel) - alert.addAction(cancelAction) - + let alert = UIAlertController(locationDetail: locationDetail, preferredStyle: .actionSheet) { mapApp in + guard mapApp != nil else { return } + } present(alert, animated: true, completion: nil) } } From 0a767031a33e2535750a9638615fb30867eb8a1a Mon Sep 17 00:00:00 2001 From: Eniola Anthony Date: Sun, 3 Sep 2023 18:17:28 +0600 Subject: [PATCH 2/7] Fix: resolve bug that causes App crash when location permission is not given on searching for locations --- .../Helpers/Search/SearchResultsUpdater.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/ios/GuideDogs/Code/Visual UI/Helpers/Search/SearchResultsUpdater.swift b/apps/ios/GuideDogs/Code/Visual UI/Helpers/Search/SearchResultsUpdater.swift index c40cf696..e659c769 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Helpers/Search/SearchResultsUpdater.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Helpers/Search/SearchResultsUpdater.swift @@ -79,15 +79,23 @@ class SearchResultsUpdater: NSObject { } } + func fetchCoordinate() -> CLLocationCoordinate2D { + guard AppContext.shared.geolocationManager.isAuthorized, + let coordinate = self.location?.coordinate + else { + return CLLocation.sample.coordinate + } + return coordinate + } + func getMKLocalSearch(searchText: String) -> MKLocalSearch { let request = MKLocalSearch.Request() request.naturalLanguageQuery = searchText - let coordinate = self.location!.coordinate + let coordinate = fetchCoordinate() request.region = MKCoordinateRegion(center: coordinate, latitudinalMeters: 75000, longitudinalMeters: 75000) let search = MKLocalSearch(request: request) return search } - } // MARK: - UISearchResultsUpdating From 65bfe73b0a9e37216347b75b5d6fc5b56da98fbd Mon Sep 17 00:00:00 2001 From: Eniola Anthony Date: Tue, 3 Oct 2023 17:35:32 +0600 Subject: [PATCH 3/7] feat: set up new brand for App, refactor code changes --- .../SwiftUI/Gradient+Color.swift | 12 +++++- .../CustomDisclosureTableViewCell.swift | 2 +- .../Code/Visual UI/Themes/Colors.swift | 28 ++++++++++++- .../CalloutButtonPanelViewController.swift | 27 ++++++++----- .../POI Table/SearchTableViewController.swift | 39 ++++++++++--------- .../Controls/OnboardingContainer.swift | 2 +- 6 files changed, 77 insertions(+), 33 deletions(-) diff --git a/apps/ios/GuideDogs/Code/App/Framework Extensions/SwiftUI/Gradient+Color.swift b/apps/ios/GuideDogs/Code/App/Framework Extensions/SwiftUI/Gradient+Color.swift index 2da2e3b5..a6982695 100644 --- a/apps/ios/GuideDogs/Code/App/Framework Extensions/SwiftUI/Gradient+Color.swift +++ b/apps/ios/GuideDogs/Code/App/Framework Extensions/SwiftUI/Gradient+Color.swift @@ -6,7 +6,7 @@ // Licensed under the MIT License. // -import Foundation +import UIKit import SwiftUI extension Gradient { @@ -31,5 +31,13 @@ extension Gradient { Color(.sRGB, red: 0.101, green: 0.406, blue: 0.608, opacity: 1) ]) } - + + static var palePurple: Gradient { + let uiColor1 = UIColor(hex: "#1c0549") + let uiColor2 = UIColor(hex: "#7e87cb") + + let color1 = Color(uiColor1) + let color2 = Color(uiColor2) + return Gradient(colors: [color1, color2]) + } } diff --git a/apps/ios/GuideDogs/Code/Visual UI/Controls/CustomDisclosureTableViewCell.swift b/apps/ios/GuideDogs/Code/Visual UI/Controls/CustomDisclosureTableViewCell.swift index 0882f5db..12c3dd96 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Controls/CustomDisclosureTableViewCell.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Controls/CustomDisclosureTableViewCell.swift @@ -31,8 +31,8 @@ class CustomDisclosureTableViewCell: UITableViewCell { // Initialization code self.accessoryView = disclosureImage - self.selectionStyle = .default + backgroundColor = Colors.Background.primary } func showActivityIndicator() { diff --git a/apps/ios/GuideDogs/Code/Visual UI/Themes/Colors.swift b/apps/ios/GuideDogs/Code/Visual UI/Themes/Colors.swift index e2a2f251..5af1eb95 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Themes/Colors.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Themes/Colors.swift @@ -20,7 +20,7 @@ struct Colors { } struct Background { - static let primary: UIColor? = UIColor(named: "Background 1") + static let primary: UIColor? = UIColor(hex: "#604696") static let secondary: UIColor? = UIColor(named: "Background 2") static let tertiary: UIColor? = UIColor(named: "Background 3") static let quaternary: UIColor? = UIColor(named: "Background Base") @@ -64,3 +64,29 @@ extension Color { static let yellowHighlight = Color(Colors.Highlight.yellow!) static let greenHighlight = Color(Colors.Highlight.green!) } + + +// MARK: - Hex colors + +public extension UIColor { + + convenience init(hex: UInt32) { + self.init( + red: CGFloat((hex & 0xFF0000) >> 16) / 255.0, + green: CGFloat((hex & 0x00FF00) >> 8) / 255.0, + blue: CGFloat(hex & 0x0000FF) / 255.0, + alpha: CGFloat(1.0) + ) + } + + convenience init(hex: String) { + var hexSanitized = hex.trimmingCharacters(in: .whitespacesAndNewlines) + hexSanitized = hexSanitized.replacingOccurrences(of: "#", with: "") + + guard let intHex = UInt32(hexSanitized, radix: 16) else { + fatalError("Incorrect string hex") + } + + self.init(hex: intHex) + } +} diff --git a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/CalloutButtonPanelViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/CalloutButtonPanelViewController.swift index 5565e6b3..bcaf1d3d 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/CalloutButtonPanelViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/CalloutButtonPanelViewController.swift @@ -47,16 +47,10 @@ class CalloutButtonPanelViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - - // Configure header - headerLabel.text = GDLocalizedString("callouts.panel.title").uppercasedWithAppLocale() - + + stylize() configureButtonLabels() - - NotificationCenter.default.addObserver(self, selector: #selector(self.handleDidToggleLocateNotification), name: Notification.Name.didToggleLocate, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(self.handleDidToggleOrientateNotification), name: Notification.Name.didToggleOrientate, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(self.handleDidToggleLookAheadNotification), name: Notification.Name.didToggleLookAhead, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(self.handleDidToggleMarkedPointsNotification), name: Notification.Name.didToggleMarkedPoints, object: nil) + setNotification() } override func viewDidLayoutSubviews() { @@ -99,7 +93,20 @@ class CalloutButtonPanelViewController: UIViewController { element.accessibilityIdentifier = "btn.nearbymarkers" } } - +// MARK: - Private functions + + private func stylize() { + view.backgroundColor = Colors.Background.primary + headerLabel.text = GDLocalizedString("callouts.panel.title").uppercasedWithAppLocale() + } + + private func setNotification() { + NotificationCenter.default.addObserver(self, selector: #selector(self.handleDidToggleLocateNotification), name: Notification.Name.didToggleLocate, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(self.handleDidToggleOrientateNotification), name: Notification.Name.didToggleOrientate, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(self.handleDidToggleLookAheadNotification), name: Notification.Name.didToggleLookAhead, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(self.handleDidToggleMarkedPointsNotification), name: Notification.Name.didToggleMarkedPoints, object: nil) + } + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) diff --git a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/SearchTableViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/SearchTableViewController.swift index 09a32d8c..03a71c4e 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/SearchTableViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/SearchTableViewController.swift @@ -92,23 +92,8 @@ class SearchTableViewController: BaseTableViewController { override func viewDidLoad() { super.viewDidLoad() - - // If this is a release build, hide `Nearby Places Map` - if FeatureFlag.isEnabled(.developerTools) == false { - navigationItem.rightBarButtonItems = [] - } - - // Initialize search controller - self.searchController = UISearchController(delegate: self) - - // Add search controller to navigation bar - self.navigationItem.searchController = self.searchController - self.navigationItem.hidesSearchBarWhenScrolling = false - - // Search results will be displayed modally - // Use this view controller to define presentation context - self.definesPresentationContext = true - + + setActions() updateTableView() } @@ -161,7 +146,25 @@ class SearchTableViewController: BaseTableViewController { preferredContentSize.height = UIView.preferredContentHeight(for: tableView) } - // `UITableView` + // MARK: - // `UITableView` Private functions + + private func setActions() { + // If this is a release build, hide `Nearby Places Map` + if FeatureFlag.isEnabled(.developerTools) == false { + navigationItem.rightBarButtonItems = [] + } + + // Initialize search controller + self.searchController = UISearchController(delegate: self) + + // Add search controller to navigation bar + self.navigationItem.searchController = self.searchController + self.navigationItem.hidesSearchBarWhenScrolling = false + + // Search results will be displayed modally + // Use this view controller to define presentation context + self.definesPresentationContext = true + } private func updateTableView() { DispatchQueue.main.async { [weak self] in diff --git a/apps/ios/GuideDogs/Code/Visual UI/Views/Onboarding/Controls/OnboardingContainer.swift b/apps/ios/GuideDogs/Code/Visual UI/Views/Onboarding/Controls/OnboardingContainer.swift index 03f696e1..bf9a65f3 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Views/Onboarding/Controls/OnboardingContainer.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Views/Onboarding/Controls/OnboardingContainer.swift @@ -55,7 +55,7 @@ struct OnboardingContainer: View { .frame(maxWidth: .infinity, maxHeight: .infinity) .padding(.vertical, 48.0) } - .linearGradientBackground(.darkBlue, ignoresSafeArea: true) + .linearGradientBackground(.palePurple, ignoresSafeArea: true) .navigationBarHidden(true) .accessibilityIgnoresInvertColors(true) } From 2d95995e3e897441fb65ee65e2e2431e8b66eea6 Mon Sep 17 00:00:00 2001 From: Eniola Anthony Date: Mon, 16 Oct 2023 17:19:51 +0600 Subject: [PATCH 4/7] feat: update colors as per design --- .../GuideDogs/Code/Data/Services/Helpers/ServiceModel.swift | 2 +- .../Current Behavior Card/CardStateViewController.swift | 1 - .../View Controllers/Launch/DynamicLaunchViewController.swift | 3 ++- .../Visual UI/Views/Beacon/BeaconViewHostingController.swift | 2 -- .../Views/Markers & Routes/MarkersAndRoutesList.swift | 4 ++-- .../Recommender/Containers/RecommenderContainerView.swift | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/ios/GuideDogs/Code/Data/Services/Helpers/ServiceModel.swift b/apps/ios/GuideDogs/Code/Data/Services/Helpers/ServiceModel.swift index b171bcb4..a51ce2af 100644 --- a/apps/ios/GuideDogs/Code/Data/Services/Helpers/ServiceModel.swift +++ b/apps/ios/GuideDogs/Code/Data/Services/Helpers/ServiceModel.swift @@ -34,7 +34,7 @@ class ServiceModel { static let errorRealm = "GDAHTTPErrorRealm" private static let productionServicesHostName = - "https://soundscape.scottishtecharmy.org/" + "https://prd2.soundscape.scottishtecharmy.org/" private static let productionAssestsHostName = "https://yourstaticblobstore" // Do not change `productionVoicesHostName`! private static let productionVoicesHostName = "https://yourstaticblobstore" diff --git a/apps/ios/GuideDogs/Code/Visual UI/Controls/Current Behavior Card/CardStateViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/Controls/Current Behavior Card/CardStateViewController.swift index 0779f988..1280fdfb 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Controls/Current Behavior Card/CardStateViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Controls/Current Behavior Card/CardStateViewController.swift @@ -60,7 +60,6 @@ class CardStateViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - // Configure the initial state if AppContext.shared.eventProcessor.activeBehavior is RouteGuidance { state = .route diff --git a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Launch/DynamicLaunchViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Launch/DynamicLaunchViewController.swift index d991326e..bac87c8b 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Launch/DynamicLaunchViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Launch/DynamicLaunchViewController.swift @@ -12,6 +12,7 @@ import AppCenter import AppCenterAnalytics import AppCenterCrashes import Combine +import SwiftUI class DynamicLaunchViewController: UIViewController { @@ -24,7 +25,7 @@ class DynamicLaunchViewController: UIViewController { /// static initialization or are global. override func viewDidLoad() { super.viewDidLoad() - + view.backgroundColor = UIColor(Color.primaryBackground) // Do any additional setup after loading the view. LoggingContext.shared.start() diff --git a/apps/ios/GuideDogs/Code/Visual UI/Views/Beacon/BeaconViewHostingController.swift b/apps/ios/GuideDogs/Code/Visual UI/Views/Beacon/BeaconViewHostingController.swift index fa096e47..252f0401 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Views/Beacon/BeaconViewHostingController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Views/Beacon/BeaconViewHostingController.swift @@ -26,11 +26,9 @@ class BeaconViewHostingController: UIHostingController { override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() - let height = UIView.preferredContentHeightCompressedHeight(for: view) preferredContentSize.height = height self.view.invalidateIntrinsicContentSize() } - } diff --git a/apps/ios/GuideDogs/Code/Visual UI/Views/Markers & Routes/MarkersAndRoutesList.swift b/apps/ios/GuideDogs/Code/Visual UI/Views/Markers & Routes/MarkersAndRoutesList.swift index bc694822..1219b14b 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Views/Markers & Routes/MarkersAndRoutesList.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Views/Markers & Routes/MarkersAndRoutesList.swift @@ -45,7 +45,7 @@ struct MarkerRouteTabButton: View { Spacer() } .padding() - .background(Color.secondaryBackground) + .background(Color.primaryBackground) } var body: some View { @@ -130,7 +130,7 @@ struct MarkersAndRoutesList: View { value: .routes, selected: $selectedList) } - .background(Color.secondaryBackground + .background(Color.primaryBackground .ignoresSafeArea(.all, edges: [.bottom]) .shadow(color: .black, radius: 5.0, x: 0.0, y: -1.0)) diff --git a/apps/ios/GuideDogs/Code/Visual UI/Views/Recommender/Containers/RecommenderContainerView.swift b/apps/ios/GuideDogs/Code/Visual UI/Views/Recommender/Containers/RecommenderContainerView.swift index 24f637b5..f6076278 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Views/Recommender/Containers/RecommenderContainerView.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Views/Recommender/Containers/RecommenderContainerView.swift @@ -39,7 +39,7 @@ struct RecommenderContainerView: View { .padding(.horizontal, 18.0) .padding(.vertical, 12.0) .frame(maxWidth: .infinity, alignment: .leading) - .linearGradientBackground(.purple) + .background(Color.primaryBackground) .accessibilityElement(children: .combine) } From 4560c0b9221947a97ee4a9fd5c22ec678e6498f1 Mon Sep 17 00:00:00 2001 From: Eniola Anthony Date: Mon, 16 Oct 2023 17:52:35 +0600 Subject: [PATCH 5/7] feat: add new color set and replace lanch screen color --- .../Contents.json | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 apps/ios/GuideDogs/Assets/Colors/Colors.xcassets/Background/StaticLaunchScreenBgColor.colorset/Contents.json diff --git a/apps/ios/GuideDogs/Assets/Colors/Colors.xcassets/Background/StaticLaunchScreenBgColor.colorset/Contents.json b/apps/ios/GuideDogs/Assets/Colors/Colors.xcassets/Background/StaticLaunchScreenBgColor.colorset/Contents.json new file mode 100644 index 00000000..a66b4886 --- /dev/null +++ b/apps/ios/GuideDogs/Assets/Colors/Colors.xcassets/Background/StaticLaunchScreenBgColor.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "150", + "green" : "70", + "red" : "96" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "150", + "green" : "70", + "red" : "96" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "150", + "green" : "70", + "red" : "96" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} From c7bc2088cb7d3ff8274485b7f0ee94e104c35273 Mon Sep 17 00:00:00 2001 From: Eniola Anthony Date: Mon, 16 Oct 2023 18:04:17 +0600 Subject: [PATCH 6/7] feat: update App brand --- .../Launch/DynamicLaunchViewController.swift | 1 - .../Code/Visual UI/Views/Launch-Dynamic.storyboard | 11 ++++++++--- .../Code/Visual UI/Views/Launch-Static.storyboard | 10 +++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Launch/DynamicLaunchViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Launch/DynamicLaunchViewController.swift index bac87c8b..466c6190 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Launch/DynamicLaunchViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Launch/DynamicLaunchViewController.swift @@ -25,7 +25,6 @@ class DynamicLaunchViewController: UIViewController { /// static initialization or are global. override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = UIColor(Color.primaryBackground) // Do any additional setup after loading the view. LoggingContext.shared.start() diff --git a/apps/ios/GuideDogs/Code/Visual UI/Views/Launch-Dynamic.storyboard b/apps/ios/GuideDogs/Code/Visual UI/Views/Launch-Dynamic.storyboard index a061e124..155dfca9 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Views/Launch-Dynamic.storyboard +++ b/apps/ios/GuideDogs/Code/Visual UI/Views/Launch-Dynamic.storyboard @@ -1,8 +1,10 @@ - + - + + + @@ -51,7 +53,7 @@ - + @@ -71,5 +73,8 @@ + + + diff --git a/apps/ios/GuideDogs/Code/Visual UI/Views/Launch-Static.storyboard b/apps/ios/GuideDogs/Code/Visual UI/Views/Launch-Static.storyboard index 7469ee33..a321dd8d 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Views/Launch-Static.storyboard +++ b/apps/ios/GuideDogs/Code/Visual UI/Views/Launch-Static.storyboard @@ -1,9 +1,10 @@ - + - + + @@ -48,7 +49,7 @@ - + @@ -63,5 +64,8 @@ + + + From 121b28f4b377ddb586aac8d45d7c73951fa65642 Mon Sep 17 00:00:00 2001 From: Eniola Anthony Date: Mon, 16 Oct 2023 18:08:17 +0600 Subject: [PATCH 7/7] Updates --- .../UINavigationBarAppearance+Extensions.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/ios/GuideDogs/Code/App/Framework Extensions/UI Class Extensions/UINavigationBarAppearance+Extensions.swift b/apps/ios/GuideDogs/Code/App/Framework Extensions/UI Class Extensions/UINavigationBarAppearance+Extensions.swift index 61c0d625..2fd42bf0 100644 --- a/apps/ios/GuideDogs/Code/App/Framework Extensions/UI Class Extensions/UINavigationBarAppearance+Extensions.swift +++ b/apps/ios/GuideDogs/Code/App/Framework Extensions/UI Class Extensions/UINavigationBarAppearance+Extensions.swift @@ -18,6 +18,7 @@ extension UINavigationBarAppearance { case .darkBlue: configureWithOpaqueBackground() } + // Background and foreground colors backgroundColor = navigationBarStyle.backgroundUIColor titleTextAttributes = [.foregroundColor: navigationBarStyle.foregroundUIColor]