From e12970b74ee30ca7130bdb82af8d9b401d39fa7f Mon Sep 17 00:00:00 2001 From: Ivan <6350992+bivant@users.noreply.github.com> Date: Fri, 22 Mar 2019 20:12:08 +0300 Subject: [PATCH 1/2] Appear with selected view controller (was always first one) --- Sources/PagerTabStripViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/PagerTabStripViewController.swift b/Sources/PagerTabStripViewController.swift index d7e5551a..41bf500a 100644 --- a/Sources/PagerTabStripViewController.swift +++ b/Sources/PagerTabStripViewController.swift @@ -104,6 +104,7 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate { containerView.isPagingEnabled = true reloadViewControllers() + currentIndex = preCurrentIndex let childController = viewControllers[currentIndex] addChild(childController) childController.view.autoresizingMask = [.flexibleHeight, .flexibleWidth] From bcc4c1bbd5329ac3c3552cdb486d1624d270a020 Mon Sep 17 00:00:00 2001 From: Ivan <6350992+bivant@users.noreply.github.com> Date: Fri, 22 Mar 2019 20:22:14 +0300 Subject: [PATCH 2/2] Code style (tabs -> spaces) --- Sources/PagerTabStripViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/PagerTabStripViewController.swift b/Sources/PagerTabStripViewController.swift index 41bf500a..8e854888 100644 --- a/Sources/PagerTabStripViewController.swift +++ b/Sources/PagerTabStripViewController.swift @@ -104,7 +104,7 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate { containerView.isPagingEnabled = true reloadViewControllers() - currentIndex = preCurrentIndex + currentIndex = preCurrentIndex let childController = viewControllers[currentIndex] addChild(childController) childController.view.autoresizingMask = [.flexibleHeight, .flexibleWidth]