File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 3
3
The easiest way of using Parchment is to initialize ` PagingViewController ` with the an array of the view controllers you want to display:
4
4
5
5
``` Swift
6
+ import Parchment
7
+
6
8
class ViewController : UIViewController {
7
9
override func viewDidLoad () {
8
10
super .viewDidLoad ()
@@ -20,9 +22,9 @@ class ViewController: UIViewController {
20
22
Then add the ` pagingViewController ` as a child view controller and setup the constraints for the view:
21
23
22
24
``` Swift
23
- addChildViewController (pagingViewController)
25
+ addChild (pagingViewController)
24
26
view.addSubview (pagingViewController.view )
25
- pagingViewController.didMove (toParentViewController : self )
27
+ pagingViewController.didMove (toParent : self )
26
28
pagingViewController.view .translatesAutoresizingMaskIntoConstraints = false
27
29
28
30
NSLayoutConstraint.activate ([
You can’t perform that action at this time.
0 commit comments