Skip to content

Commit

Permalink
[SSDK-962] Update Discover/Category tab (#273)
Browse files Browse the repository at this point in the history
### Description
Fixes SSDK-962

- Fetch fewer results for a more legible Demo
- Adjust annotation pin anchor and opacity
- Rename Discover to Category
  • Loading branch information
aokj4ck authored Jul 12, 2024
1 parent dfb7067 commit 7999375
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Sources/Demo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@
</objects>
<point key="canvasLocation" x="729" y="1529"/>
</scene>
<!--Discover-->
<!--Category-->
<scene sceneID="Cbv-pg-ufB">
<objects>
<navigationController navigationBarHidden="YES" id="kQh-we-4TL" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Discover" image="tag" catalog="system" id="FHv-mk-0xk"/>
<tabBarItem key="tabBarItem" title="Category" image="tag" catalog="system" id="FHv-mk-0xk"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="XUy-LY-TcY">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
Expand Down Expand Up @@ -401,10 +401,10 @@
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="tertiarySystemGroupedBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
7 changes: 6 additions & 1 deletion Sources/Demo/DiscoverViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ extension DiscoverViewController {
private func handleSearchInRegionAction() {
let regionResultsLimit = switch category.apiType {
case .geocoding:
/// Geocoding has a limit of 10 results
10
default:
100
/// You can request up to 100 results for SBS and SearchBox API types
/// For this demo we will request fewer for this UI output
20
}

category.search(
Expand Down Expand Up @@ -117,6 +120,8 @@ extension DiscoverViewController {
/// Display a corresponding Maki icon for this Result when available
if let name = $0.makiIcon, let maki = Maki(rawValue: name) {
point.image = .init(image: maki.icon, name: maki.name)
point.iconOpacity = 0.6
point.iconAnchor = .bottom
}

return point
Expand Down

0 comments on commit 7999375

Please sign in to comment.