To run the example project, clone the repo, and run pod install from the Example directory first.
Screenshots
Start
Select
Gender Selection
Voilà!
Installation
ALBusSeatView is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod'ALBusSeatView'
Usage
// If you want to config more// let config = ALBusSeatViewConfig()// ALBusSeatView(withConfig: config)letseatView=ALBusSeatView()
seatView.delegate =self
seatView.dataSource =self
view.addSubview(seatView)//ALBusSeatViewDataSourcefunc seatView(_ seatView:ALBusSeatView, numberOfSeatInSection section:Int)->Int{return43// Total seat count}func seatView(_ seatView:ALBusSeatView, seatNumberForIndex indexPath:IndexPath)->String{return"10"// Seat Number}func seatView(_ seatView:ALBusSeatView,
seatTypeForIndex indexPath:IndexPath)->ALBusSeatType{return.empty
}// Seat TypespublicenumALBusSeatType:Int{/// Free to pickcase empty
/// Already sold by woman or mancase sold
/// Being selectedcase selected
/// Already sold by womancase soldWoman
/// Already sold by mancase soldMan
/// Not a seat. Can not be able to selectcase none
}