Skip to content

Commit 62c089c

Browse files
author
Ryan Nystrom
committed
more readable code sample
1 parent de99428 commit 62c089c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ The base view controller uses a `MessageAutocompleteController` control to handl
5858
This control uses a plain `UITableView` to display its autocomplete. Add a `dataSource` and `delegate` to display and handle interactions.
5959

6060
```swift
61-
messageAutocompleteController.tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
62-
messageAutocompleteController.tableView.dataSource = self
63-
messageAutocompleteController.tableView.delegate = self
61+
let tableView = messageAutocompleteController.tableView
62+
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
63+
tableView.dataSource = self
64+
tableView.delegate = self
6465
```
6566

6667
Then register for autocomplete prefixes you want to respond to and set a `delegate` to handle when a prefix is found.

0 commit comments

Comments
 (0)