Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
sonifex committed Mar 3, 2020
1 parent 19a766c commit 137f9a4
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
@@ -1,6 +1,7 @@
# ALBusSeatView 💺

[![Version](https://img.shields.io/cocoapods/v/ALBusSeatView.svg?style=flat)](https://cocoapods.org/pods/ALBusSeatView)[![License](https://img.shields.io/cocoapods/l/ALBusSeatView.svg?style=flat)](https://cocoapods.org/pods/ALBusSeatView)[![Platform](https://img.shields.io/cocoapods/p/ALBusSeatView.svg?style=flat)](https://cocoapods.org/pods/ALBusSeatView)
[![Version](https://img.shields.io/cocoapods/v/ALBusSeatView.svg?style=flat)](https://cocoapods.org/pods/ALBusSeatView) [![License](https://img.shields.io/cocoapods/l/ALBusSeatView.svg?style=flat)](https://cocoapods.org/pods/ALBusSeatView) [![Platform](https://img.shields.io/cocoapods/p/ALBusSeatView.svg?style=flat)](https://cocoapods.org/pods/ALBusSeatView)


## Example

Expand Down Expand Up @@ -41,10 +42,51 @@ seatView.dataSource = self

view.addSubview(seatView)

//ALBusSeatViewDataSource

func seatView(_ seatView: ALBusSeatView, numberOfSeatInSection section: Int) -> Int {
return 43 // 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 Types

public enum ALBusSeatType: Int {
/// Free to pick
case empty
/// Already sold by woman or man
case sold
/// Being selected
case selected
/// Already sold by woman
case soldWoman
/// Already sold by man
case soldMan
/// Not a seat. Can not be able to select
case none
}

```



## Documentation

* [API Reference](https://applogistdev.github.io/ALBusSeatView/)




## Config (ALBusSeatViewConfig)

#### Layout
Expand All @@ -59,6 +101,7 @@ view.addSubview(seatView)
| Param | Desc | Default | Type |
| ----------------------- | ---- | ------- | -------- |
| seatEmptyBGColor | Empty seat color | .white | UIColor |
| seatSoldBGColor | Seat color purchased by woman or man. (Common seat) | .gray | UIColor |
| seatSelectedBGColor | Selected seat color | .green | UIColor |
| seatSoldWomanBGColor | Seat color purchased by woman | .red | UIColor |
| seatSoldManBGColor | Seat color purchased by man | .blue | UIColor |
Expand Down

0 comments on commit 137f9a4

Please sign in to comment.