From ce62e0be5052d8c6d082a21e367be1d46b32fca2 Mon Sep 17 00:00:00 2001 From: Tom Baranes Date: Mon, 15 Jun 2020 15:34:45 +0200 Subject: [PATCH] Updating basic usage documentation --- Documentation/basic-usage.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/basic-usage.md b/Documentation/basic-usage.md index 9d287818..deba31eb 100644 --- a/Documentation/basic-usage.md +++ b/Documentation/basic-usage.md @@ -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() @@ -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([