ALBusSeatViewDelegate
public protocol ALBusSeatViewDelegate : AnyObject
This protocol represents the display and behaviour of the seatView.
-
seatView(_:shouldSelectAtIndex:seatType:)
Default implementationAsks the delegate if the specified seat should be selected
Default Implementation
Declaration
Swift
func seatView(_ seatView: ALBusSeatView, shouldSelectAtIndex indexPath: IndexPath, seatType: ALBusSeatType) -> Bool
Parameters
seatView
SeatView that is making this request
indexPath
The indexPath that being selected
seatType
The current type of seat which is about to select
-
seatView(_:shouldDeSelectAtIndex:seatType:)
Default implementationAsks the delegate if the specified seat should be deSelected
Default Implementation
Declaration
Swift
func seatView(_ seatView: ALBusSeatView, shouldDeSelectAtIndex indexPath: IndexPath, seatType: ALBusSeatType) -> Bool
Parameters
seatView
SeatView that is making this request
indexPath
The indexPath that being deSelected
seatType
The current type of seat which is about to deSelect
-
seatView(_:didSelectAtIndex:seatType:selectionType:)
Default implementationTells the delegate that the specified seat now selected
Default Implementation
Declaration
Swift
func seatView(_ seatView: ALBusSeatView, didSelectAtIndex indexPath: IndexPath, seatType: ALBusSeatType, selectionType: ALSelectionType)
Parameters
seatView
SeatView that is making this request
indexPath
The indexPath that selected
seatType
The previous type of seat which is selected
selectionType
The gender type that selected by user
-
seatView(_:deSelectAtIndex:seatType:)
Default implementationTells the delegate that the specified seat now deSelected
Default Implementation
Declaration
Swift
func seatView(_ seatView: ALBusSeatView, deSelectAtIndex indexPath: IndexPath, seatType: ALBusSeatType)
Parameters
seatView
SeatView that is making this request
indexPath
The indexPath that deSelected
seatType
The previous type of seat which is deSelected