[ios] Update design of existence and opening hour confirmation for place page

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Yannik Bloscheck
2025-08-22 20:22:43 +02:00
committed by Yannik Bloscheck
parent d1f9806901
commit c616e235a1
14 changed files with 152 additions and 79 deletions

View File

@@ -1,13 +0,0 @@
import Foundation
extension Date {
func formatTimeAgo() -> String {
return Self.relativeFormatter.localizedString(for: self, relativeTo: Date())
}
private static let relativeFormatter: RelativeDateTimeFormatter = {
let formatter = RelativeDateTimeFormatter()
formatter.unitsStyle = .full
return formatter
}()
}

View File

@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.961",
"green" : "0.961",
"red" : "0.961"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.118",
"green" : "0.110",
"red" : "0.110"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -533,6 +533,10 @@
"editor_report_problem_send_button" = "Send";
"autodownload" = "Auto-download maps";
/* Place page confirmation messages and time ago formatting */
"existence_confirmed_time_ago" = "Existence confirmed %@";
"hours_confirmed_time_ago" = "Confirmed %@";
/* Place Page opening hours text */
"closed_now" = "Closed now";

View File

@@ -321,7 +321,6 @@
676507601C10559800830BB3 /* patterns.txt in Resources */ = {isa = PBXBuildFile; fileRef = 451950391B7A3E070085DA05 /* patterns.txt */; };
676507611C10559B00830BB3 /* colors.txt in Resources */ = {isa = PBXBuildFile; fileRef = 452FCA3A1B6A3DF7007019AB /* colors.txt */; };
6B9978361C89A316003B8AA0 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 6B9978341C89A316003B8AA0 /* editor.config */; };
8325C4E12E45519600457516 /* Date+TimeAgo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8325C4E02E45519600457516 /* Date+TimeAgo.swift */; };
8C4FB9C72BEFEFF400D44877 /* CarPlayWindowScaleAdjuster.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4FB9C62BEFEFF400D44877 /* CarPlayWindowScaleAdjuster.swift */; };
8CB13C3B2BF1276A004288F2 /* CarplayPlaceholderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CB13C3A2BF1276A004288F2 /* CarplayPlaceholderView.swift */; };
99012847243F0D6900C72B10 /* UIViewController+alternative.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99012846243F0D6900C72B10 /* UIViewController+alternative.swift */; };
@@ -1209,7 +1208,6 @@
5605022E1B6211E100169CAD /* sound-strings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "sound-strings"; path = "../../data/sound-strings"; sourceTree = "<group>"; };
6741AA5D1BF340DE002C974C /* CoMaps (Debug).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CoMaps (Debug).app"; sourceTree = BUILT_PRODUCTS_DIR; };
6B9978341C89A316003B8AA0 /* editor.config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = editor.config; path = ../../data/editor.config; sourceTree = "<group>"; };
8325C4E02E45519600457516 /* Date+TimeAgo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+TimeAgo.swift"; sourceTree = "<group>"; };
8C4FB9C62BEFEFF400D44877 /* CarPlayWindowScaleAdjuster.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarPlayWindowScaleAdjuster.swift; sourceTree = "<group>"; };
8CB13C3A2BF1276A004288F2 /* CarplayPlaceholderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarplayPlaceholderView.swift; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* CoMaps.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = CoMaps.plist; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
@@ -2287,7 +2285,6 @@
3454D7981E07F045004AF2AD /* Categories */ = {
isa = PBXGroup;
children = (
8325C4E02E45519600457516 /* Date+TimeAgo.swift */,
ED83880E2D54DEA4002A0536 /* UIImage+FilledWithColor.swift */,
99A614E223CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.h */,
99A614E323CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.m */,
@@ -4640,7 +4637,6 @@
998927382449E60200260CE2 /* BottomMenuPresenter.swift in Sources */,
27697F832E254AA100FBD913 /* EmbeddedSafariView.swift in Sources */,
F6E2FE821E097BA00083EBEC /* MWMPlacePageOpeningHoursDayView.m in Sources */,
8325C4E12E45519600457516 /* Date+TimeAgo.swift in Sources */,
F6E2FD6B1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.m in Sources */,
CDCA27842245090900167D87 /* ListenerContainer.swift in Sources */,
27AF18582E1DB63A00CD41E2 /* Appearance.swift in Sources */,

View File

@@ -43,6 +43,9 @@ class OpeningHoursDayViewController: UIViewController {
class OpeningHoursViewController: UIViewController {
@IBOutlet var stackView: UIStackView!
@IBOutlet var checkDateLabel: UILabel!
@IBOutlet var checkDateLabelTopLayoutConstraint: NSLayoutConstraint!
@IBOutlet var checkDateLabelBottomLayoutConstraint: NSLayoutConstraint!
private var otherDaysViews: [OpeningHoursDayViewController] = []
@@ -56,6 +59,7 @@ class OpeningHoursViewController: UIViewController {
private var expanded = false
var openingHours: OpeningHours!
var openingHoursCheckDate: Date?
override func viewDidLoad() {
super.viewDidLoad()
@@ -79,6 +83,23 @@ class OpeningHoursViewController: UIViewController {
self.otherDaysViews.forEach { vc in
vc.view.isHidden = !self.expanded
}
if let checkDate = self.openingHoursCheckDate, self.expanded {
let checkDateFormatter = RelativeDateTimeFormatter()
checkDateFormatter.unitsStyle = .spellOut
checkDateFormatter.localizedString(for: checkDate, relativeTo: Date.now)
self.checkDateLabel.text = String(format: L("hours_confirmed_time_ago"), checkDateFormatter.localizedString(for: checkDate, relativeTo: Date.now))
NSLayoutConstraint.activate([self.checkDateLabelTopLayoutConstraint])
NSLayoutConstraint.activate([self.checkDateLabelBottomLayoutConstraint])
} else {
self.checkDateLabel.text = String()
NSLayoutConstraint.deactivate([self.checkDateLabelTopLayoutConstraint])
NSLayoutConstraint.deactivate([self.checkDateLabelBottomLayoutConstraint])
}
self.checkDateLabel.isHidden = !self.expanded
self.todayView.arrowImageView.transform = self.expanded ? CGAffineTransform(rotationAngle: -CGFloat.pi + 0.01)
: CGAffineTransform.identity
self.view.layoutIfNeeded()

View File

@@ -5,7 +5,8 @@ class PlacePageHeaderBuilder {
let storyboard = UIStoryboard.instance(.placePage)
let viewController = storyboard.instantiateViewController(ofType: PlacePageHeaderViewController.self);
let presenter = PlacePageHeaderPresenter(view: viewController,
placePageData: data,
placePagePreviewData: data.previewData,
objectType: data.objectType,
delegate: delegate,
headerType: headerType)

View File

@@ -23,28 +23,26 @@ class PlacePageHeaderPresenter {
private weak var view: PlacePageHeaderViewProtocol?
private let placePagePreviewData: PlacePagePreviewData
private let placePageData: PlacePageData
let objectType: PlacePageObjectType
private weak var delegate: PlacePageHeaderViewControllerDelegate?
private let headerType: HeaderType
init(view: PlacePageHeaderViewProtocol,
placePageData: PlacePageData,
placePagePreviewData: PlacePagePreviewData,
objectType: PlacePageObjectType,
delegate: PlacePageHeaderViewControllerDelegate?,
headerType: HeaderType) {
self.view = view
self.delegate = delegate
self.placePageData = placePageData
self.placePagePreviewData = placePageData.previewData
self.objectType = placePageData.objectType
self.placePagePreviewData = placePagePreviewData
self.objectType = objectType
self.headerType = headerType
}
}
extension PlacePageHeaderPresenter: PlacePageHeaderPresenterProtocol {
func configure() {
let existenceConfirmation = getExistenceConfirmationText()
view?.setTitle(placePagePreviewData.title, secondaryTitle: placePagePreviewData.secondaryTitle, existenceConfirmation: existenceConfirmation)
view?.setTitle(placePagePreviewData.title, secondaryTitle: placePagePreviewData.secondaryTitle)
switch headerType {
case .flexible:
view?.isExpandViewHidden = false
@@ -70,10 +68,4 @@ extension PlacePageHeaderPresenter: PlacePageHeaderPresenterProtocol {
func onExportTrackButtonPress(_ type: KmlFileType, from sourceView: UIView) {
delegate?.previewDidPressExportTrack(type, from: sourceView)
}
private func getExistenceConfirmationText() -> String? {
guard let mostRecentDate = placePageData.infoData?.getMostRecentCheckDate() else { return nil }
let timeAgoText = mostRecentDate.formatTimeAgo()
return String(format: L("existence_confirmed_time_ago"), timeAgoText)
}
}

View File

@@ -3,7 +3,7 @@ protocol PlacePageHeaderViewProtocol: AnyObject {
var isExpandViewHidden: Bool { get set }
var isShadowViewHidden: Bool { get set }
func setTitle(_ title: String?, secondaryTitle: String?, existenceConfirmation: String?)
func setTitle(_ title: String?, secondaryTitle: String?)
func showShareTrackMenu()
}
@@ -77,7 +77,7 @@ extension PlacePageHeaderViewController: PlacePageHeaderViewProtocol {
}
}
func setTitle(_ title: String?, secondaryTitle: String?, existenceConfirmation: String? = nil) {
func setTitle(_ title: String?, secondaryTitle: String?) {
titleText = title
secondaryText = secondaryTitle
// XCode 13 is not smart enough to detect that title is used below, and requires explicit unwrapped variable.
@@ -93,18 +93,6 @@ extension PlacePageHeaderViewController: PlacePageHeaderViewProtocol {
let attributedText = NSMutableAttributedString(string: unwrappedTitle, attributes: titleAttributes)
// Add existence confirmation if available
if let existenceText = existenceConfirmation {
let existenceParagraphStyle = NSMutableParagraphStyle()
existenceParagraphStyle.paragraphSpacingBefore = 1
let existenceAttributes: [NSAttributedString.Key: Any] = [
.font: UIFont.systemFont(ofSize: 11),
.foregroundColor: UIColor.blackSecondaryText(),
.paragraphStyle: existenceParagraphStyle
]
attributedText.append(NSAttributedString(string: "\n" + existenceText, attributes: existenceAttributes))
}
guard let unwrappedSecondaryTitle = secondaryTitle else {
titleLabel?.attributedText = attributedText
return

View File

@@ -159,6 +159,8 @@ class PlacePageInfoViewController: UIViewController {
private typealias Style = InfoItemView.Style
@IBOutlet var stackView: UIStackView!
@IBOutlet var checkDateLabel: UILabel!
@IBOutlet var checkDateLabelLayoutConstraint: NSLayoutConstraint!
private lazy var openingHoursViewController: OpeningHoursViewController = {
storyboard!.instantiateViewController(ofType: OpeningHoursViewController.self)
@@ -207,13 +209,8 @@ class PlacePageInfoViewController: UIViewController {
stackView.alignment = .fill
stackView.spacing = 0
stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.addSeparator(.bottom)
view.addSubview(stackView)
NSLayoutConstraint.activate([
stackView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
stackView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
stackView.topAnchor.constraint(equalTo: view.topAnchor),
stackView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
setupViews()
}
@@ -221,6 +218,7 @@ class PlacePageInfoViewController: UIViewController {
private func setupViews() {
if let openingHours = placePageInfoData.openingHours {
openingHoursViewController.openingHours = openingHours
openingHoursViewController.openingHoursCheckDate = placePageInfoData.checkDateOpeningHours
addChild(openingHoursViewController)
addToStack(openingHoursViewController.view)
openingHoursViewController.didMove(toParent: self)
@@ -458,6 +456,19 @@ class PlacePageInfoViewController: UIViewController {
setupCoordinatesView()
setupOpenWithAppView()
if let checkDate = placePageInfoData.checkDate {
let checkDateFormatter = RelativeDateTimeFormatter()
checkDateFormatter.unitsStyle = .spellOut
checkDateFormatter.localizedString(for: checkDate, relativeTo: Date.now)
self.checkDateLabel.text = String(format: L("existence_confirmed_time_ago"), checkDateFormatter.localizedString(for: checkDate, relativeTo: Date.now))
checkDateLabel.isHidden = false
NSLayoutConstraint.activate([checkDateLabelLayoutConstraint])
} else {
checkDateLabel.text = String()
checkDateLabel.isHidden = true
NSLayoutConstraint.deactivate([checkDateLabelLayoutConstraint])
}
}
private func setupCoordinatesView() {

View File

@@ -40,8 +40,6 @@ final class PlacePagePreviewViewController: UIViewController {
}
}
var placePageData: PlacePageData?
private var distance: String? = nil
private var speedAndAltitude: String? = nil
private var heading: CGFloat? = nil
@@ -86,9 +84,6 @@ final class PlacePagePreviewViewController: UIViewController {
subtitleString.append(NSAttributedString(string: !subtitleString.string.isEmpty ? "" + subtitle : subtitle,
attributes: [.foregroundColor : UIColor.blackSecondaryText(),
.font : UIFont.regular14()]))
}
if !subtitleString.string.isEmpty {
subtitleLabel.attributedText = subtitleString
subtitleContainerView.isHidden = false
} else {
@@ -260,15 +255,6 @@ final class PlacePagePreviewViewController: UIViewController {
attributedString.append(detailsString)
}
if let openingHoursDate = placePageData?.infoData?.checkDateOpeningHours {
let timeAgoText = openingHoursDate.formatTimeAgo()
let openingHoursDateString = NSAttributedString(string: "" + String(format: L("hours_confirmed_time_ago"), timeAgoText),
attributes: [NSAttributedString.Key.font: UIFont.regular12(),
NSAttributedString.Key.foregroundColor: UIColor.blackSecondaryText()])
attributedString.append(openingHoursDateString)
}
scheduleLabel.attributedText = attributedString
}
}

View File

@@ -4,6 +4,7 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="Stack View standard spacing" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -391,16 +392,39 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="pmL-HT-I1N">
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="96"/>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NMf-TU-1P1">
<rect key="frame" x="0.0" y="96" width="375" height="4"/>
<subviews>
<label userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WIw-cD-4aR">
<rect key="frame" x="18" y="4" width="339" height="0.0"/>
<color key="backgroundColor" name="Press Background Color"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="Press Background Color"/>
<constraints>
<constraint firstItem="WIw-cD-4aR" firstAttribute="leading" secondItem="NMf-TU-1P1" secondAttribute="leading" constant="18" id="1c4-qC-r5Q"/>
<constraint firstItem="WIw-cD-4aR" firstAttribute="top" secondItem="NMf-TU-1P1" secondAttribute="top" constant="4" id="4a9-bg-siG"/>
<constraint firstItem="WIw-cD-4aR" firstAttribute="top" secondItem="NMf-TU-1P1" secondAttribute="top" priority="750" id="btT-aI-fBS"/>
<constraint firstAttribute="trailing" secondItem="WIw-cD-4aR" secondAttribute="trailing" constant="18" id="hLS-Zu-Egy"/>
<constraint firstAttribute="bottom" secondItem="WIw-cD-4aR" secondAttribute="bottom" id="myR-Jq-0zU"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="g60-e9-U8G"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="pmL-HT-I1N" secondAttribute="bottom" id="0Xe-Gp-10C"/>
<constraint firstItem="NMf-TU-1P1" firstAttribute="top" secondItem="pmL-HT-I1N" secondAttribute="bottom" id="7CD-wN-QBE"/>
<constraint firstItem="g60-e9-U8G" firstAttribute="trailing" secondItem="NMf-TU-1P1" secondAttribute="trailing" id="HLm-Xn-oJO"/>
<constraint firstItem="NMf-TU-1P1" firstAttribute="leading" secondItem="g60-e9-U8G" secondAttribute="leading" id="R7d-jc-rKk"/>
<constraint firstAttribute="top" secondItem="pmL-HT-I1N" secondAttribute="top" id="THV-MF-4pC"/>
<constraint firstItem="pmL-HT-I1N" firstAttribute="leading" secondItem="uyH-Qn-86F" secondAttribute="leading" id="VNA-7u-TMS"/>
<constraint firstAttribute="trailing" secondItem="pmL-HT-I1N" secondAttribute="trailing" id="sUb-Fg-UED"/>
<constraint firstAttribute="bottom" secondItem="NMf-TU-1P1" secondAttribute="bottom" id="tde-KC-gmp"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Background"/>
@@ -409,6 +433,8 @@
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="375" height="100"/>
<connections>
<outlet property="checkDateLabel" destination="WIw-cD-4aR" id="pKw-Wb-XVW"/>
<outlet property="checkDateLabelLayoutConstraint" destination="4a9-bg-siG" id="wIH-MS-2Ic"/>
<outlet property="stackView" destination="pmL-HT-I1N" id="33x-d6-3Lw"/>
</connections>
</viewController>
@@ -526,18 +552,38 @@
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="mrt-5g-RRn">
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
</stackView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lv7-Ig-hWB">
<rect key="frame" x="56" y="100" width="303" height="0.0"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="lM2-J8-T6c"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="mrt-5g-RRn" secondAttribute="bottom" id="5wi-9V-R6Z"/>
<constraint firstItem="lv7-Ig-hWB" firstAttribute="top" secondItem="mrt-5g-RRn" secondAttribute="bottom" constant="12" id="5wi-9V-R6Z"/>
<constraint firstAttribute="trailing" secondItem="lv7-Ig-hWB" secondAttribute="trailing" constant="16" id="Kit-DZ-e0h"/>
<constraint firstItem="mrt-5g-RRn" firstAttribute="leading" secondItem="QE6-Lg-X0g" secondAttribute="leading" id="NO1-zN-EiJ"/>
<constraint firstItem="lv7-Ig-hWB" firstAttribute="top" secondItem="mrt-5g-RRn" secondAttribute="bottom" priority="750" id="hGX-Xp-WTY"/>
<constraint firstAttribute="bottom" secondItem="lv7-Ig-hWB" secondAttribute="bottom" constant="12" id="iva-mv-Z6T"/>
<constraint firstAttribute="top" secondItem="mrt-5g-RRn" secondAttribute="top" id="oq2-uJ-EhG"/>
<constraint firstAttribute="bottom" secondItem="lv7-Ig-hWB" secondAttribute="bottom" priority="750" id="vV4-fA-p7B"/>
<constraint firstAttribute="trailing" secondItem="mrt-5g-RRn" secondAttribute="trailing" id="wG7-Td-jWS"/>
<constraint firstItem="lv7-Ig-hWB" firstAttribute="leading" secondItem="QE6-Lg-X0g" secondAttribute="leading" constant="56" id="wr7-Os-puB"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="iva-mv-Z6T"/>
<exclude reference="5wi-9V-R6Z"/>
</mask>
</variation>
</view>
<size key="freeformSize" width="375" height="100"/>
<connections>
<outlet property="checkDateLabel" destination="lv7-Ig-hWB" id="d36-WZ-S1Y"/>
<outlet property="checkDateLabelBottomLayoutConstraint" destination="iva-mv-Z6T" id="zmV-xd-yXQ"/>
<outlet property="checkDateLabelTopLayoutConstraint" destination="5wi-9V-R6Z" id="EG8-a3-s5L"/>
<outlet property="stackView" destination="mrt-5g-RRn" id="0xW-H9-lLi"/>
</connections>
</viewController>
@@ -1243,7 +1289,7 @@
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="lIJ-bh-coX" firstAttribute="leading" secondItem="Bn7-Ag-wuu" secondAttribute="leading" constant="56" id="WXv-gZ-ygJ"/>
<constraint firstAttribute="bottom" secondItem="lIJ-bh-coX" secondAttribute="bottom" constant="12" id="Wcq-WA-Qd8"/>
<constraint firstAttribute="bottom" secondItem="lIJ-bh-coX" secondAttribute="bottom" constant="12" id="g7V-FG-sWe"/>
<constraint firstAttribute="trailing" secondItem="lIJ-bh-coX" secondAttribute="trailing" constant="16" id="hw3-UC-uCp"/>
<constraint firstItem="lIJ-bh-coX" firstAttribute="top" secondItem="Bn7-Ag-wuu" secondAttribute="top" constant="12" id="tpq-hf-4gG"/>
</constraints>
@@ -1404,14 +1450,20 @@
<image name="dialog_btn_press" width="280" height="44"/>
<image name="ic_arrow_gray_down" width="28" height="28"/>
<image name="ic_placepage_open_hours" width="28" height="28"/>
<namedColor name="Press Background Color">
<color red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="secondaryLabelColor">
<color red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="separatorColor">
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<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>
</resources>
</document>

View File

@@ -33,7 +33,6 @@ class PlacePageCommonLayout: NSObject, IPlacePageLayout {
private lazy var previewViewController: PlacePagePreviewViewController = {
let vc = storyboard.instantiateViewController(ofType: PlacePagePreviewViewController.self)
vc.placePagePreviewData = placePageData.previewData
vc.placePageData = placePageData
return vc
}()
@@ -111,7 +110,6 @@ class PlacePageCommonLayout: NSObject, IPlacePageLayout {
guard let self = self else { return }
self.actionBarViewController.updateBookmarkButtonState(isSelected: self.placePageData.bookmarkData != nil)
self.previewViewController.placePagePreviewData = self.placePageData.previewData
self.previewViewController.placePageData = self.placePageData
self.updateBookmarkRelatedSections()
}

View File

@@ -28,7 +28,6 @@ class PlacePageTrackLayout: IPlacePageLayout {
private lazy var previewViewController: PlacePagePreviewViewController = {
let vc = storyboard.instantiateViewController(ofType: PlacePagePreviewViewController.self)
vc.placePagePreviewData = placePageData.previewData
vc.placePageData = placePageData
return vc
}()
@@ -81,7 +80,6 @@ class PlacePageTrackLayout: IPlacePageLayout {
placePageData.onBookmarkStatusUpdate = { [weak self] in
guard let self = self else { return }
self.previewViewController.placePagePreviewData = self.placePageData.previewData
self.previewViewController.placePageData = self.placePageData
self.updateTrackRelatedSections()
}
@@ -115,7 +113,6 @@ private extension PlacePageTrackLayout {
}
if let previewViewController = headerViewControllers.compactMap({ $0 as? PlacePagePreviewViewController }).first {
previewViewController.placePagePreviewData = previewData
previewViewController.placePageData = self.placePageData
previewViewController.updateViews()
}
presenter?.layoutIfNeeded()

View File

@@ -214,10 +214,12 @@ final class PlacePageScrollView: UIScrollView {
viewController.didMove(toParent: self)
if showSeparator {
viewController.view.addSeparator(.top)
if !(viewController is PlacePageInfoViewController) {
viewController.view.addSeparator(.bottom)
}
}
}
}
private func cleanupLayout() {
guard let layout else { return }