Skip to content

Commit cf01c55

Browse files
authored
Fix formatting
1 parent 4b719c1 commit cf01c55

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

ViewControllers.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,32 @@ It is not necessary to retain `segue` because it retains itself until dismissal.
3535

3636
`SwiftMessagesSegue` generally requires configuration to achieve specific layouts and optional behaviors. There are a few good ways to do this:
3737

38-
1. __(Recommended)__ Subclass `SwiftMessagesSegue` and apply configurations in `init(identifier:source:destination:)`. Subclasses will automatically appear in the segue type dialog using an auto-generated name. For example, the name for "VeryNiceSegue" would be "very nice".
38+
1. __(Recommended)__ Subclass `SwiftMessagesSegue` and apply configurations in `init(identifier:source:destination:)`. Subclasses will automatically appear in the segue type dialog using an auto-generated name. For example, the name for "VeryNiceSegue" would be "very nice".
3939

4040

41-
````swift
42-
class VeryNiceSegue: SwiftMessagesSegue {
43-
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
44-
super.init(identifier: identifier, source: source, destination: destination)
45-
configure(layout: .bottomCard)
46-
dimMode = .blur(style: .dark, alpha: 0.9, interactive: true)
47-
messageView.configureNoDropShadow()
48-
}
49-
}
50-
````
41+
```swift
42+
class VeryNiceSegue: SwiftMessagesSegue {
43+
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
44+
super.init(identifier: identifier, source: source, destination: destination)
45+
configure(layout: .bottomCard)
46+
dimMode = .blur(style: .dark, alpha: 0.9, interactive: true)
47+
messageView.configureNoDropShadow()
48+
}
49+
}
50+
```
5151

5252

53-
1. Apply configurations in `prepare(for:sender:)` of the presenting view controller after down-casting the segue to `SwiftMessagesSegue`.
53+
1. Apply configurations in `prepare(for:sender:)` of the presenting view controller after down-casting the segue to `SwiftMessagesSegue`.
5454

55-
````swift
55+
````swift
5656
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
5757
if let segue = segue as? SwiftMessagesSegue {
5858
segue.configure(layout: .bottomCard)
5959
segue.dimMode = .blur(style: .dark, alpha: 0.9, interactive: true)
6060
segue.messageView.configureNoDropShadow()
6161
}
6262
}
63-
````
63+
````
6464

6565
The `configure(layout:)` method is a shortcut for configuring some basic layout and animation options that roughly mirror the options in `SwiftMessages.Layout`.
6666

0 commit comments

Comments
 (0)