Browse Source

PagerTabStripViewController: Use abs instead of fabs in Swift 4.2

Soomin Lee 6 years ago
parent
commit
1d423e4751
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Sources/PagerStripViewController.swift

+ 1 - 1
Sources/PagerStripViewController.swift

@@ -214,7 +214,7 @@ class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
 
         for (index, childController) in pagerViewControllers.enumerated() {
             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 {
                     childController.view.frame = CGRect(x: offsetForChild(at: index), y: 0, width: view.bounds.width, height: containerView.bounds.height)
                     childController.view.autoresizingMask = [.flexibleHeight, .flexibleWidth]