Skip to content

Commit

Permalink
Updating basic usage documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaranes committed Jun 15, 2020
1 parent af4c977 commit ce62e0b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Documentation/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
The easiest way of using Parchment is to initialize `PagingViewController` with the an array of the view controllers you want to display:

```Swift
import Parchment

class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
Expand All @@ -20,9 +22,9 @@ class ViewController: UIViewController {
Then add the `pagingViewController` as a child view controller and setup the constraints for the view:

```Swift
addChildViewController(pagingViewController)
addChild(pagingViewController)
view.addSubview(pagingViewController.view)
pagingViewController.didMove(toParentViewController: self)
pagingViewController.didMove(toParent: self)
pagingViewController.view.translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint.activate([
Expand Down

0 comments on commit ce62e0b

Please sign in to comment.