Commit 1d423e47 authored by Soomin Lee's avatar Soomin Lee

PagerTabStripViewController: Use abs instead of fabs in Swift 4.2

parent 12b30449
...@@ -214,7 +214,7 @@ class PagerTabStripViewController: UIViewController, UIScrollViewDelegate { ...@@ -214,7 +214,7 @@ class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
for (index, childController) in pagerViewControllers.enumerated() { for (index, childController) in pagerViewControllers.enumerated() {
let pageOffsetForChild = self.pageOffsetForChild(at: index) let pageOffsetForChild = self.pageOffsetForChild(at: index)
if fabs(containerView.contentOffset.x - pageOffsetForChild) < containerView.bounds.width { if abs(containerView.contentOffset.x - pageOffsetForChild) < containerView.bounds.width {
if childController.parent != nil { if childController.parent != nil {
childController.view.frame = CGRect(x: offsetForChild(at: index), y: 0, width: view.bounds.width, height: containerView.bounds.height) childController.view.frame = CGRect(x: offsetForChild(at: index), y: 0, width: view.bounds.width, height: containerView.bounds.height)
childController.view.autoresizingMask = [.flexibleHeight, .flexibleWidth] childController.view.autoresizingMask = [.flexibleHeight, .flexibleWidth]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment