Skip to content

Commit f714811

Browse files
authored
Merge pull request #502 from tbaranes/master
Updating basic usage documentation
2 parents af4c977 + ce62e0b commit f714811

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Documentation/basic-usage.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
The easiest way of using Parchment is to initialize `PagingViewController` with the an array of the view controllers you want to display:
44

55
```Swift
6+
import Parchment
7+
68
class ViewController: UIViewController {
79
override func viewDidLoad() {
810
super.viewDidLoad()
@@ -20,9 +22,9 @@ class ViewController: UIViewController {
2022
Then add the `pagingViewController` as a child view controller and setup the constraints for the view:
2123

2224
```Swift
23-
addChildViewController(pagingViewController)
25+
addChild(pagingViewController)
2426
view.addSubview(pagingViewController.view)
25-
pagingViewController.didMove(toParentViewController: self)
27+
pagingViewController.didMove(toParent: self)
2628
pagingViewController.view.translatesAutoresizingMaskIntoConstraints = false
2729

2830
NSLayoutConstraint.activate([

0 commit comments

Comments
 (0)