From 85f2575e509450838dea9c663e64c9c098023b33 Mon Sep 17 00:00:00 2001 From: Ben Verbeken Date: Wed, 17 Apr 2024 09:43:05 +0200 Subject: [PATCH] added support for showSeatLabels (#22) --- seatsio-ios/Example/SeatingChartSample.swift | 1 + seatsio-ios/SeatingChartConfig.swift | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/seatsio-ios/Example/SeatingChartSample.swift b/seatsio-ios/Example/SeatingChartSample.swift index 4267d7c..dc56be1 100644 --- a/seatsio-ios/Example/SeatingChartSample.swift +++ b/seatsio-ios/Example/SeatingChartSample.swift @@ -20,6 +20,7 @@ class SeatingChartSample: UIViewController { .priceFormatter({ (price) in "\(price)$" }) .objectTooltip(ObjectTooltip().showAvailability(true)) .showLegend(true) + .showSeatLabels(true) .onSelectionInvalid({ (errors) in print(errors) }) .onObjectSelected({ (object, ticketType) in print(object, ticketType) diff --git a/seatsio-ios/SeatingChartConfig.swift b/seatsio-ios/SeatingChartConfig.swift index 0161dfc..6635d4c 100644 --- a/seatsio-ios/SeatingChartConfig.swift +++ b/seatsio-ios/SeatingChartConfig.swift @@ -25,6 +25,7 @@ public class SeatingChartConfig: Encodable { var alwaysShowSectionContents: Bool? var showSectionContents: String? var showLegend: Bool? + var showSeatLabels: Bool? var legend: Legend? var showMinimap: Bool? var showActiveSectionTooltip: Bool? @@ -200,6 +201,11 @@ public class SeatingChartConfig: Encodable { return self } + public func showSeatLabels(_ showSeatLabels: Bool) -> Self { + self.showSeatLabels = showSeatLabels + return self + } + public func legend(_ legend: Legend) -> Self { self.legend = legend return self @@ -456,6 +462,7 @@ public class SeatingChartConfig: Encodable { case alwaysShowSectionContents case showSectionContents case showLegend + case showSeatLabels case legend case showMinimap case showActiveSectionTooltip = "showActiveSectionTooltipOnMobile"