seatsio-ios allows rendering seats.io seating charts inside an iOS application. It supports iOS 9.0 and newer.
Add this to your podfile:
pod 'seatsio', '15.2.0'
class SeatingChartSample: UIViewController {
var seatsio: SeatsioWebView!
override func loadView() {
let config: SeatingChartConfig = SeatingChartConfig()
.workspaceKey("<your public workspace key>")
.event("<your event key>")
seatsio = SeatsioWebView(frame: UIScreen.main.bounds, region: "eu", seatsioConfig: config)
self.view = seatsio
}
}
You can find the all the configuration options at https://docs.seats.io/docs/renderer-configure-your-floor-plan
SeatingChartConfig()
.pricing([
Pricing(category: "1", price: 40),
Pricing(category: "2", price: 50)
])
.priceFormatter({ (price) in "\(price)$" })
SeatingChartConfig()
.pricing([
Pricing(category: "1", ticketTypes: [
TicketTypePricing(ticketType: "child", price: 10),
TicketTypePricing(ticketType: "adult", price: 15)]),
Pricing(category: "2", ticketTypes: [
TicketTypePricing(ticketType: "child", price: 20),
TicketTypePricing(ticketType: "adult", price: 30)])
])
.priceFormatter({ (price) in "\(price)$" })
var seatingChart: SeatingChart!
let config: SeatingChartConfig = SeatingChartConfig()
.workspaceKey("<your public workspace key>")
.event("<your event key>")
.session("start")
.onChartRendered({ (chart) in
seatingChart = chart
})
// after webview has rendered
seatingChart.getHoldtoken({ (token) in
// do something with the token
})
SeatingChartConfig()
.onObjectSelected({ (object, ticketType) in
print(object, ticketType)
})
.onObjectDeselected({ (object, ticketType) in
print(object, ticketType)
})
var seatingChart: SeatingChart!
let config: SeatingChartConfig = SeatingChartConfig()
.workspaceKey("<your public workspace key>")
.event("<your event key>")
.onChartRendered({ (chart) in
seatingChart = chart
})
// after webview has rendered
seatingChart.listSelectedObjects({ (objects) in
// do something with the objects
})
var seatingChart: SeatingChart!
let config: SeatingChartConfig = SeatingChartConfig()
.workspaceKey("<your public workspace key>")
.event("<your event key>")
.onChartRendered({ (chart) in
seatingChart = chart
})
// after webview has rendered
seatingChart.getReportBySelectability({ (report) in
// do something with the report
})
var seatingChart: SeatingChart!
let config: SeatingChartConfig = SeatingChartConfig()
.workspaceKey("<your public workspace key>")
.event("<your event key>")
.onChartRendered({ (chart) in
seatingChart = chart
})
// after webview has rendered
seatingChart.zoomToSection(label: "<sectionLabel>")
var seatingChart: SeatingChart!
let config: SeatingChartConfig = SeatingChartConfig()
.workspaceKey("<your public workspace key>")
.event("<your event key>")
.onChartRendered({ (chart) in
chart.selectObject("K-3") // or chart.deselectObject("K-3")
chart.pulseObject("K-3") // or chart.unpulseObject("K-3")
chart.isObjectInChannel("K-3", "NO_CHANNEL", { (result) in print("Is object in channel NO_CHANNEL? " + String(result)) })
})