ALBusSeatViewDelegate

public protocol ALBusSeatViewDelegate : AnyObject

This protocol represents the display and behaviour of the seatView.

  • Asks 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

  • Asks 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

  • Tells 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 implementation

    Tells 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