Skip to content

Commit f03351e

Browse files
authored
Fix list in README.
1 parent 30cc929 commit f03351e

1 file changed

Lines changed: 23 additions & 25 deletions

File tree

README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -122,36 +122,34 @@ on the code. When the task is done you have 3 options to proceed:
122122

123123
1. Dismiss `BarcodeScannerController` and show your results.
124124

125-
```swift
126-
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String) {
127-
// Code processing
128-
controller.dismissViewControllerAnimated(true, completion: nil)
129-
}
130-
```
131-
125+
```swift
126+
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String) {
127+
// Code processing
128+
controller.dismissViewControllerAnimated(true, completion: nil)
129+
}
130+
```
132131
2. Show an error message and switch back to the scanning mode (for example,
133132
when there is no product found with a given barcode in your database):
134133

135-
<div align="center">
136-
<img src="https://github.com/hyperoslo/BarcodeScanner/blob/master/Art/ExampleError.png" alt="BarcodeScanner error" width="270" height="480" />
137-
</div><br/>
138-
139-
```swift
140-
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String) {
141-
// Code processing
142-
controller.resetWithError("Error message")
143-
// If message is not provided the default message from the config will be used instead.
144-
}
145-
```
146-
134+
<div align="center">
135+
<img src="https://github.com/hyperoslo/BarcodeScanner/blob/master/Art/ExampleError.png" alt="BarcodeScanner error" width="270" height="480" />
136+
</div><br/>
137+
138+
```swift
139+
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String) {
140+
// Code processing
141+
controller.resetWithError("Error message")
142+
// If message is not provided the default message from the config will be used instead.
143+
}
144+
```
147145
3. Reset the controller to the scanning mode (with or without animation):
148146

149-
```swift
150-
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String) {
151-
// Code processing
152-
controller.reset(animated: true)
153-
}
154-
```
147+
```swift
148+
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String) {
149+
// Code processing
150+
controller.reset(animated: true)
151+
}
152+
```
155153

156154
If you want to do continuous barcode scanning just set the `oneTimeSearch`
157155
property on your `BarcodeScannerController` instance to `false`.

0 commit comments

Comments
 (0)