Skip to content

Commit 4b0aed5

Browse files
committed
Fix indentation of code in Readme
1 parent 0c2851b commit 4b0aed5

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Current Swift compatibility breakdown:
3030

3131
| Swift Version | Framework Version |
3232
| ------------- | ----------------- |
33-
| 3.0 | 3.x |
34-
| 2.3 | 2.x |
35-
| 2.2 | 1.x |
33+
| 3.0 | 3.x |
34+
| 2.3 | 2.x |
35+
| 2.2 | 1.x |
3636

3737
[all releases]: https://github.com/aschuch/StatefulViewController/releases
3838

@@ -81,13 +81,13 @@ override func viewWillAppear(animated: Bool) {
8181
}
8282

8383
func loadDeliciousWines() {
84-
startLoading()
84+
startLoading()
8585

86-
let url = NSURL(string: "http://example.com/api")
87-
let session = NSURLSession.sharedSession()
88-
session.dataTaskWithURL(url) { (let data, let response, let error) in
89-
endLoading(error: error)
90-
}.resume()
86+
let url = NSURL(string: "http://example.com/api")
87+
let session = NSURLSession.sharedSession()
88+
session.dataTaskWithURL(url) { (let data, let response, let error) in
89+
endLoading(error: error)
90+
}.resume()
9191
}
9292
```
9393

@@ -97,7 +97,7 @@ StatefulViewController calls the `hasContent` method to check if there is any co
9797

9898
```swift
9999
func hasContent() -> Bool {
100-
return datasourceArray.count > 0
100+
return datasourceArray.count > 0
101101
}
102102
```
103103

@@ -107,9 +107,9 @@ To e.g. show a custom alert or other unobtrusive error message, use `handleError
107107

108108
```swift
109109
func handleErrorWhenContentAvailable(error: ErrorType) {
110-
let alertController = UIAlertController(title: "Ooops", message: "Something went wrong.", preferredStyle: .Alert)
111-
alertController.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
112-
self.presentViewController(alertController, animated: true, completion: nil)
110+
let alertController = UIAlertController(title: "Ooops", message: "Something went wrong.", preferredStyle: .Alert)
111+
alertController.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
112+
presentViewController(alertController, animated: true, completion: nil)
113113
}
114114
```
115115

@@ -121,9 +121,9 @@ Per default, StatefulViewController presents all configured placeholder views fu
121121

122122
```swift
123123
class MyPlaceholderView: UIView, StatefulPlaceholderView {
124-
func placeholderViewInsets() -> UIEdgeInsets {
125-
return UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
126-
}
124+
func placeholderViewInsets() -> UIEdgeInsets {
125+
return UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
126+
}
127127
}
128128
```
129129

@@ -146,12 +146,12 @@ stateMachine["other"] = otherView
146146

147147
// Transition to state
148148
stateMachine.transitionToState(.View("loading"), animated: true) {
149-
println("finished switching to loading view")
149+
println("finished switching to loading view")
150150
}
151151

152152
// Hide all views
153153
stateMachine.transitionToState(.None, animated: true) {
154-
println("all views hidden now")
154+
println("all views hidden now")
155155
}
156156
```
157157

0 commit comments

Comments
 (0)