From b5478a20373fa846dff9f46c8db5bd80e8e14a4d Mon Sep 17 00:00:00 2001 From: Martin Barreto Date: Thu, 21 Jan 2016 12:36:07 -0300 Subject: [PATCH] polish code --- .../Example/BarExampleViewController.swift | 6 +- .../Example/ChildExampleViewController.swift | 4 +- .../Example/ReloadExampleViewController.swift | 57 +++++++------- .../SegmentedExampleViewController.swift | 3 +- .../TableChildExampleViewController.swift | 4 +- Sources/BarPagerTabStripViewController.swift | 17 ++--- Sources/BarView.swift | 56 ++++++-------- Sources/ChildItemInfo.swift | 52 +++++++++++++ Sources/PagerTabStripOptions.swift | 41 ++++++++++ Sources/PagerTabStripViewController.swift | 74 +++++++------------ ...peDirection.swift => SwipeDirection.swift} | 0 XLPagerTabStrip.xcodeproj/project.pbxproj | 40 ++++++++-- 12 files changed, 217 insertions(+), 137 deletions(-) create mode 100644 Sources/ChildItemInfo.swift create mode 100644 Sources/PagerTabStripOptions.swift rename Sources/{PagerTabStripSwipeDirection.swift => SwipeDirection.swift} (100%) diff --git a/Example/Example/BarExampleViewController.swift b/Example/Example/BarExampleViewController.swift index aa56549..a7b3efa 100644 --- a/Example/Example/BarExampleViewController.swift +++ b/Example/Example/BarExampleViewController.swift @@ -14,7 +14,6 @@ public class BarExampleViewController: BarPagerTabStripViewController { required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) - isProgressiveIndicator = true } public override func viewDidLoad() { @@ -52,8 +51,9 @@ public class BarExampleViewController: BarPagerTabStripViewController { public override func reloadPagerTabStripView() { isReload = true - isProgressiveIndicator = (rand() % 2 == 0) - isElasticIndicatorLimit = (rand() % 2 == 0) + pagerOptions = rand() % 2 == 0 ? pagerOptions.union(.SkipIntermediateViewControllers) : (pagerOptions.remove(.SkipIntermediateViewControllers) ?? pagerOptions) + pagerOptions = rand() % 2 == 0 ? pagerOptions.union(.IsProgressiveIndicator) : (pagerOptions.remove(.IsProgressiveIndicator) ?? pagerOptions) + pagerOptions = rand() % 2 == 0 ? pagerOptions.union(.IsElasticIndicatorLimit) : (pagerOptions.remove(.IsElasticIndicatorLimit) ?? pagerOptions) super.reloadPagerTabStripView() } } diff --git a/Example/Example/ChildExampleViewController.swift b/Example/Example/ChildExampleViewController.swift index 4bf69a9..095646f 100644 --- a/Example/Example/ChildExampleViewController.swift +++ b/Example/Example/ChildExampleViewController.swift @@ -27,7 +27,7 @@ class ChildExampleViewController: UIViewController, PagerTabStripChildItem { // MARK: - XLPagerTabStripViewControllerDelegate - func childHeaderForPagerTabStripViewController(pagerTabStripController: PagerTabStripViewController) -> ChildHeaderData { - return ChildHeaderData(title: "View", image: nil, highlightedImage: nil, color: .whiteColor()) + func childHeaderForPagerTabStripViewController(pagerTabStripController: PagerTabStripViewController) -> ChildItemInfo { + return ChildItemInfo(title: "View", image: nil, highlightedImage: nil, color: .whiteColor()) } } diff --git a/Example/Example/ReloadExampleViewController.swift b/Example/Example/ReloadExampleViewController.swift index dfcc06f..f0f3f60 100644 --- a/Example/Example/ReloadExampleViewController.swift +++ b/Example/Example/ReloadExampleViewController.swift @@ -12,54 +12,47 @@ import XLPagerTabStrip public class ReloadExampleViewController: UIViewController { @IBOutlet public var titleLabel: UILabel! + public lazy var bigLabel: UILabel = { + let bigLabel = UILabel() + bigLabel.backgroundColor = .clearColor() + bigLabel.textColor = .whiteColor() + bigLabel.font = UIFont.boldSystemFontOfSize(20) + bigLabel.adjustsFontSizeToFitWidth = true + return bigLabel + }() + public override func viewDidLoad() { super.viewDidLoad() if let _ = navigationController { - let bigLabel = UILabel() - bigLabel.backgroundColor = .clearColor() - bigLabel.textColor = .whiteColor() - bigLabel.font = UIFont.boldSystemFontOfSize(20) - bigLabel.adjustsFontSizeToFitWidth = true navigationItem.titleView = bigLabel bigLabel.sizeToFit() } - for childViewController in childViewControllers { - if let child = childViewController as? PagerTabStripViewController { - updateTitle(child) - break; - } + if let pagerViewController = childViewControllers.filter( { $0 is PagerTabStripViewController } ).first as? PagerTabStripViewController { + updateTitle(pagerViewController) } } @IBAction func reloadTapped(sender: UIBarButtonItem) { for childViewController in childViewControllers { - if let child = childViewController as? PagerTabStripViewController { - child.reloadPagerTabStripView() - updateTitle(child) - break; + guard let child = childViewController as? PagerTabStripViewController else { + continue } + child.reloadPagerTabStripView() + updateTitle(child) + break; } } - - func updateTitle(pagerTabStripViewController: PagerTabStripViewController) -> Void { - let title = String(format: "Progressive = \(stringFromBool(pagerTabStripViewController.isProgressiveIndicator)) ElasticLimit = \(stringFromBool(pagerTabStripViewController.isElasticIndicatorLimit))") - titleLabel.text = title + func updateTitle(pagerTabStripViewController: PagerTabStripViewController) { + func stringFromBool(bool: Bool) -> String { + return bool ? "YES" : "NO" + } - if let titleview = navigationItem.titleView as? UILabel { - titleview.text = title - navigationItem.titleView?.sizeToFit() - } + titleLabel.text = "Progressive = \(stringFromBool(pagerTabStripViewController.pagerOptions.contains(.IsProgressiveIndicator))) ElasticLimit = \(stringFromBool(pagerTabStripViewController.pagerOptions.contains(.IsElasticIndicatorLimit)))" + + (navigationItem.titleView as? UILabel)?.text = titleLabel.text + navigationItem.titleView?.sizeToFit() } - - func stringFromBool(bool: Bool) -> String { - if bool { - return "YES" - } - else { - return "NO" - } - } -} \ No newline at end of file +} diff --git a/Example/Example/SegmentedExampleViewController.swift b/Example/Example/SegmentedExampleViewController.swift index 85ec86c..42eee58 100644 --- a/Example/Example/SegmentedExampleViewController.swift +++ b/Example/Example/SegmentedExampleViewController.swift @@ -40,8 +40,7 @@ public class SegmentedExampleViewController: SegmentedPagerTabStripViewControlle @IBAction func reloadTapped(sender: UIBarButtonItem) { isReload = true - isProgressiveIndicator = (rand() % 2 == 0) - isElasticIndicatorLimit = (rand() % 2 == 0) + pagerOptions = rand() % 2 == 0 ? pagerOptions.union(.SkipIntermediateViewControllers) : (pagerOptions.remove(.SkipIntermediateViewControllers) ?? pagerOptions) reloadPagerTabStripView() } diff --git a/Example/Example/TableChildExampleViewController.swift b/Example/Example/TableChildExampleViewController.swift index 07c351a..b3be2ed 100644 --- a/Example/Example/TableChildExampleViewController.swift +++ b/Example/Example/TableChildExampleViewController.swift @@ -42,7 +42,7 @@ class TableChildExampleViewController: UITableViewController, PagerTabStripChild // MARK: - XLPagerTabStripChildItem - func childHeaderForPagerTabStripViewController(pagerTabStripController: PagerTabStripViewController) -> ChildHeaderData { - return ChildHeaderData(title: "Table View", image: nil, highlightedImage: nil, color: .whiteColor()) + func childHeaderForPagerTabStripViewController(pagerTabStripController: PagerTabStripViewController) -> ChildItemInfo { + return ChildItemInfo(title: "Table View", image: nil, highlightedImage: nil, color: .whiteColor()) } } diff --git a/Sources/BarPagerTabStripViewController.swift b/Sources/BarPagerTabStripViewController.swift index 95a957e..81d6423 100644 --- a/Sources/BarPagerTabStripViewController.swift +++ b/Sources/BarPagerTabStripViewController.swift @@ -25,8 +25,9 @@ import Foundation public class BarPagerTabStripViewController: PagerTabStripViewController { + @IBOutlet lazy public var barView: BarView! = { [unowned self] in - let barView = BarView(frame: CGRectMake(0, 0, self.view.frame.size.width, 5.0), optionsAmount: self.pagerTabStripChildViewControllers.count, selectedOptionIndex: self.currentIndex) + let barView = BarView(frame: CGRectMake(0, 0, self.view.frame.size.width, 5.0)) barView.backgroundColor = .orangeColor() barView.selectedBar.backgroundColor = .blackColor() barView.autoresizingMask = .FlexibleWidth @@ -35,21 +36,17 @@ public class BarPagerTabStripViewController: PagerTabStripViewController { public override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) - - if let _ = barView.superview{ - barView.setOptionsAmount(optionsAmount: pagerTabStripChildViewControllers.count, animated: false) - barView.moveToIndex(index: currentIndex, animated: false) - } - else{ - view.addSubview(barView!) + if barView.superview == nil { + view.addSubview(barView) } + barView.optionsCount = pagerTabStripChildViewControllers.count + barView.moveToIndex(index: currentIndex, animated: false) } public override func reloadPagerTabStripView() { super.reloadPagerTabStripView() - + barView.optionsCount = pagerTabStripChildViewControllers.count if isViewLoaded(){ - barView.setOptionsAmount(optionsAmount: pagerTabStripChildViewControllers.count, animated: false) barView.moveToIndex(index: currentIndex, animated: false) } } diff --git a/Sources/BarView.swift b/Sources/BarView.swift index 1dea153..bcf8aa2 100644 --- a/Sources/BarView.swift +++ b/Sources/BarView.swift @@ -24,41 +24,42 @@ import Foundation -public class BarView: UIView{ +public class BarView: UIView { + public lazy var selectedBar: UIView = { [unowned self] in let selectedBar = UIView(frame: CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)) return selectedBar }() - var optionsAmount: Int = 1 - var selectedOptionIndex: Int = 0 + var optionsCount = 1 { + willSet(newOptionsCount) { + if newOptionsCount <= selectedIndex { + selectedIndex = optionsCount - 1 + } + } + } + var selectedIndex = 0 required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) - addSubview(selectedBar) - updateSelectedBarPositionWithAnimation(false) } - public init(frame: CGRect, optionsAmount: Int, selectedOptionIndex: Int) { - self.optionsAmount = optionsAmount - self.selectedOptionIndex = selectedOptionIndex + override init(frame: CGRect) { super.init(frame: frame) - - selectedBar = UIView(frame: CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)) addSubview(selectedBar) - updateSelectedBarPositionWithAnimation(false) } + // MARK: - Helpers - func updateSelectedBarPositionWithAnimation(animation: Bool) -> Void{ + private func updateSelectedBarPositionWithAnimation(animation: Bool) { var frame = selectedBar.frame - frame.size.width = self.frame.size.width / CGFloat(optionsAmount) - frame.origin.x = frame.size.width * CGFloat(selectedOptionIndex) - if animation{ - UIView.animateWithDuration(0.3, animations: { () -> Void in - self.selectedBar.frame = frame + frame.size.width = self.frame.size.width / CGFloat(optionsCount) + frame.origin.x = frame.size.width * CGFloat(selectedIndex) + if animation { + UIView.animateWithDuration(0.3, animations: { [weak self] in + self?.selectedBar.frame = frame }) } else{ @@ -66,16 +67,16 @@ public class BarView: UIView{ } } - public func moveToIndex(index index: Int, animated: Bool) -> Void{ - selectedOptionIndex = index + public func moveToIndex(index index: Int, animated: Bool) { + selectedIndex = index updateSelectedBarPositionWithAnimation(animated) } - public func moveToIndex(fromIndex fromIndex: Int, toIndex: Int, progressPercentage: Float) -> Void { - selectedOptionIndex = (progressPercentage > 0.5) ? toIndex : fromIndex + public func moveToIndex(fromIndex fromIndex: Int, toIndex: Int, progressPercentage: Float) { + selectedIndex = (progressPercentage > 0.5) ? toIndex : fromIndex var newFrame = selectedBar.frame - newFrame.size.width = frame.size.width / CGFloat(optionsAmount) + newFrame.size.width = frame.size.width / CGFloat(optionsCount) var fromFrame = newFrame fromFrame.origin.x = newFrame.size.width * CGFloat(fromIndex) var toFrame = newFrame @@ -85,17 +86,8 @@ public class BarView: UIView{ selectedBar.frame = targetFrame } - public func setOptionsAmount(optionsAmount optionsAmount: Int, animated: Bool) -> Void { - self.optionsAmount = optionsAmount - - if optionsAmount <= selectedOptionIndex { - selectedOptionIndex = optionsAmount - 1 - } - - updateSelectedBarPositionWithAnimation(animated) - } - public override func layoutSubviews() { + super.layoutSubviews() updateSelectedBarPositionWithAnimation(false) } } diff --git a/Sources/ChildItemInfo.swift b/Sources/ChildItemInfo.swift new file mode 100644 index 0000000..b6055ea --- /dev/null +++ b/Sources/ChildItemInfo.swift @@ -0,0 +1,52 @@ +// ChildItemInfo.swift +// XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) +// +// Copyright (c) 2016 Xmartlabs ( http://xmartlabs.com ) +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import Foundation + +public struct ChildItemInfo { + + public var title: String + public var image: UIImage? + // public var highlightedImage: UIImage? + public var color: UIColor? + + public init(title: String) { + self.title = title + } + + public init(title: String, image: UIImage?) { + self.init(title: title) + self.image = image + } + + public init(title: String, image: UIImage?, highlightedImage: UIImage?) { + self.init(title: title, image: image) + // self.highlightedImage = highlightedImage + } + + public init(title: String, image: UIImage?, highlightedImage: UIImage?, color: UIColor?){ + self.init(title: title, image: image, highlightedImage: highlightedImage) + self.color = color + } +} \ No newline at end of file diff --git a/Sources/PagerTabStripOptions.swift b/Sources/PagerTabStripOptions.swift new file mode 100644 index 0000000..b470dd7 --- /dev/null +++ b/Sources/PagerTabStripOptions.swift @@ -0,0 +1,41 @@ +// PagerTabStripOptions.swift +// XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) +// +// Copyright (c) 2016 Xmartlabs ( http://xmartlabs.com ) +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import Foundation + +public struct PagerTabStripOptions : OptionSetType { + + private enum PagerTabStripOption : Int { + case SkipIntermediateViewControllers = 1, IsProgressiveIndicator = 2, IsElasticIndicatorLimit = 4 + } + + public let rawValue: Int + public init(rawValue: Int) { self.rawValue = rawValue } + private init(_ option:PagerTabStripOption){ self.rawValue = option.rawValue } + + public static let SkipIntermediateViewControllers = PagerTabStripOptions(.SkipIntermediateViewControllers) + public static let IsProgressiveIndicator = PagerTabStripOptions(.IsProgressiveIndicator) + public static let IsElasticIndicatorLimit = PagerTabStripOptions(.IsElasticIndicatorLimit) + +} diff --git a/Sources/PagerTabStripViewController.swift b/Sources/PagerTabStripViewController.swift index 26be558..61571da 100644 --- a/Sources/PagerTabStripViewController.swift +++ b/Sources/PagerTabStripViewController.swift @@ -25,35 +25,12 @@ import Foundation -public struct ChildHeaderData { - - public var title: String - public var image: UIImage? -// public var highlightedImage: UIImage? - public var color: UIColor? - - public init(title: String) { - self.title = title - } - - public init(title: String, image: UIImage?) { - self.init(title: title) - self.image = image - } - - public init(title: String, image: UIImage?, highlightedImage: UIImage?) { - self.init(title: title, image: image) -// self.highlightedImage = highlightedImage - } - - public init(title: String, image: UIImage?, highlightedImage: UIImage?, color: UIColor?){ - self.init(title: title, image: image, highlightedImage: highlightedImage) - self.color = color - } -} + +// MARK: Protocols + public protocol PagerTabStripChildItem { - func childHeaderForPagerTabStripViewController(pagerTabStripController: PagerTabStripViewController) -> ChildHeaderData + func childHeaderForPagerTabStripViewController(pagerTabStripController: PagerTabStripViewController) -> ChildItemInfo } public protocol PagerTabStripViewControllerDelegate: class { @@ -65,31 +42,25 @@ public protocol PagerTabStripViewControllerDataSource: class { func childViewControllersForPagerTabStripViewController(pagerTabStripController: PagerTabStripViewController) ->[UIViewController] } + +//MARK: PagerTabStripViewController + public class PagerTabStripViewController: UIViewController, UIScrollViewDelegate, PagerTabStripViewControllerDataSource, PagerTabStripViewControllerDelegate { - private(set) var pagerTabStripChildViewControllers = [UIViewController]() + + @IBOutlet lazy public var containerView: UIScrollView! = { [unowned self] in let containerView = UIScrollView(frame: CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), CGRectGetHeight(self.view.bounds))) containerView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight] return containerView }() + public weak var delegate: PagerTabStripViewControllerDelegate? public weak var datasource: PagerTabStripViewControllerDataSource? - + + public var pagerOptions = PagerTabStripOptions.SkipIntermediateViewControllers.union(.IsProgressiveIndicator).union(.IsElasticIndicatorLimit) + + private(set) var pagerTabStripChildViewControllers = [UIViewController]() private(set) var currentIndex = 0 - public var skipIntermediateViewControllers = true - public var isProgressiveIndicator = false - public var isElasticIndicatorLimit = false - - private var pagerTabStripChildViewControllersForScrolling : [UIViewController]? - private var getPagerTabStripChildViewControllersForScrolling : [UIViewController] { - return pagerTabStripChildViewControllersForScrolling ?? pagerTabStripChildViewControllers - } - - private var lastPageNumber = 0 - private var lastContentOffset: CGFloat = 0.0 - private var pageBeforeRotate = 0 - private var lastSize = CGSizeMake(0, 0) - public var pageWidth: CGFloat { return CGRectGetWidth(containerView.bounds) @@ -149,7 +120,7 @@ public class PagerTabStripViewController: UIViewController, UIScrollViewDelegate if !isViewLoaded() || view.window == nil { currentIndex = index } - if animated && skipIntermediateViewControllers && abs(currentIndex - index) > 1 { + if animated && pagerOptions.contains(.SkipIntermediateViewControllers) && abs(currentIndex - index) > 1 { var tmpChildViewControllers = pagerTabStripChildViewControllers let currentChildVC = pagerTabStripChildViewControllers[currentIndex] let fromIndex = currentIndex < index ? index - 1 : index + 1 @@ -306,7 +277,7 @@ public class PagerTabStripViewController: UIViewController, UIScrollViewDelegate currentIndex = newCurrentIndex let changeCurrentIndex = newCurrentIndex != oldCurrentIndex - if isProgressiveIndicator { + if pagerOptions.contains(.IsProgressiveIndicator) { // FIXME: - check if delegate implements? pagerTabStripViewController(pagerTabStripViewController: XLPagerTabStripViewController, updateIndicatorFromIndex fromIndex: Int, toIndex index: Int, withProgressPercentage progressPercentage: Float, indexWasChanged changed: Bool) let scrollPercentage = self.scrollPercentage() @@ -344,7 +315,7 @@ public class PagerTabStripViewController: UIViewController, UIScrollViewDelegate } } - try! delegate?.pagerTabStripViewController(self, updateIndicatorFromIndex: fromIndex, toIndex: toIndex, withProgressPercentage: Float(isElasticIndicatorLimit ? scrollPercentage : (toIndex < 0 || toIndex >= getPagerTabStripChildViewControllersForScrolling.count ? CGFloat(0) : scrollPercentage)), indexWasChanged: changeCurrentIndex) + try! delegate?.pagerTabStripViewController(self, updateIndicatorFromIndex: fromIndex, toIndex: toIndex, withProgressPercentage: Float(pagerOptions.contains(.IsElasticIndicatorLimit) ? scrollPercentage : (toIndex < 0 || toIndex >= getPagerTabStripChildViewControllersForScrolling.count ? CGFloat(0) : scrollPercentage)), indexWasChanged: changeCurrentIndex) } } else{ @@ -414,4 +385,15 @@ public class PagerTabStripViewController: UIViewController, UIScrollViewDelegate public override func willRotateToInterfaceOrientation(toInterfaceOrientation: UIInterfaceOrientation, duration: NSTimeInterval) { pageBeforeRotate = currentIndex } + + + private var pagerTabStripChildViewControllersForScrolling : [UIViewController]? + private var getPagerTabStripChildViewControllersForScrolling : [UIViewController] { + return pagerTabStripChildViewControllersForScrolling ?? pagerTabStripChildViewControllers + } + private var lastPageNumber = 0 + private var lastContentOffset: CGFloat = 0.0 + private var pageBeforeRotate = 0 + private var lastSize = CGSizeMake(0, 0) + } diff --git a/Sources/PagerTabStripSwipeDirection.swift b/Sources/SwipeDirection.swift similarity index 100% rename from Sources/PagerTabStripSwipeDirection.swift rename to Sources/SwipeDirection.swift diff --git a/XLPagerTabStrip.xcodeproj/project.pbxproj b/XLPagerTabStrip.xcodeproj/project.pbxproj index 8567ada..39dfd56 100644 --- a/XLPagerTabStrip.xcodeproj/project.pbxproj +++ b/XLPagerTabStrip.xcodeproj/project.pbxproj @@ -7,9 +7,11 @@ objects = { /* Begin PBXBuildFile section */ + 281BFDC11C511C420090C26F /* ChildItemInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 281BFDC01C511C420090C26F /* ChildItemInfo.swift */; }; + 281BFDC31C511F120090C26F /* PagerTabStripOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 281BFDC21C511F120090C26F /* PagerTabStripOptions.swift */; }; 287D0A6E1C4B73BD004566D6 /* XLPagerTabStripTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 287D0A6D1C4B73BD004566D6 /* XLPagerTabStripTests.swift */; }; 28E098BE1C5002D90083B788 /* PagerTabStripError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28E098BD1C5002D90083B788 /* PagerTabStripError.swift */; }; - 28E098C01C5003130083B788 /* PagerTabStripSwipeDirection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28E098BF1C5003130083B788 /* PagerTabStripSwipeDirection.swift */; }; + 28E098C01C5003130083B788 /* SwipeDirection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28E098BF1C5003130083B788 /* SwipeDirection.swift */; }; 28F828811C494B2C00330CF4 /* XLPagerTabStrip.h in Headers */ = {isa = PBXBuildFile; fileRef = 28F828801C494B2C00330CF4 /* XLPagerTabStrip.h */; settings = {ATTRIBUTES = (Public, ); }; }; 28F828881C494B2C00330CF4 /* XLPagerTabStrip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28F8287D1C494B2C00330CF4 /* XLPagerTabStrip.framework */; }; CB71C6EE1C4EB988008EC806 /* SegmentedPagerTabStripViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB71C6ED1C4EB988008EC806 /* SegmentedPagerTabStripViewController.swift */; }; @@ -29,9 +31,11 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 281BFDC01C511C420090C26F /* ChildItemInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChildItemInfo.swift; sourceTree = ""; }; + 281BFDC21C511F120090C26F /* PagerTabStripOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagerTabStripOptions.swift; sourceTree = ""; }; 287D0A6D1C4B73BD004566D6 /* XLPagerTabStripTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = XLPagerTabStripTests.swift; path = Tests/XLPagerTabStripTests.swift; sourceTree = SOURCE_ROOT; }; 28E098BD1C5002D90083B788 /* PagerTabStripError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagerTabStripError.swift; sourceTree = ""; }; - 28E098BF1C5003130083B788 /* PagerTabStripSwipeDirection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagerTabStripSwipeDirection.swift; sourceTree = ""; }; + 28E098BF1C5003130083B788 /* SwipeDirection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwipeDirection.swift; sourceTree = ""; }; 28F8287D1C494B2C00330CF4 /* XLPagerTabStrip.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = XLPagerTabStrip.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 28F828801C494B2C00330CF4 /* XLPagerTabStrip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XLPagerTabStrip.h; sourceTree = ""; }; 28F828821C494B2C00330CF4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -63,6 +67,24 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 281BFDBE1C511B890090C26F /* Views */ = { + isa = PBXGroup; + children = ( + CBA0A1FB1C502DA300C5748C /* BarView.swift */, + ); + name = Views; + sourceTree = ""; + }; + 281BFDBF1C511B9A0090C26F /* Controllers */ = { + isa = PBXGroup; + children = ( + CBA0A1FA1C502DA300C5748C /* BarPagerTabStripViewController.swift */, + CB86ED6A1C4D6E6C00DA463B /* PagerTabStripViewController.swift */, + CB71C6ED1C4EB988008EC806 /* SegmentedPagerTabStripViewController.swift */, + ); + name = Controllers; + sourceTree = ""; + }; 28F828731C494B2C00330CF4 = { isa = PBXGroup; children = ( @@ -105,12 +127,12 @@ 28F828971C494B4200330CF4 /* Sources */ = { isa = PBXGroup; children = ( - CBA0A1FA1C502DA300C5748C /* BarPagerTabStripViewController.swift */, - CBA0A1FB1C502DA300C5748C /* BarView.swift */, - CB86ED6A1C4D6E6C00DA463B /* PagerTabStripViewController.swift */, - CB71C6ED1C4EB988008EC806 /* SegmentedPagerTabStripViewController.swift */, + 281BFDBF1C511B9A0090C26F /* Controllers */, + 281BFDBE1C511B890090C26F /* Views */, 28E098BD1C5002D90083B788 /* PagerTabStripError.swift */, - 28E098BF1C5003130083B788 /* PagerTabStripSwipeDirection.swift */, + 28E098BF1C5003130083B788 /* SwipeDirection.swift */, + 281BFDC01C511C420090C26F /* ChildItemInfo.swift */, + 281BFDC21C511F120090C26F /* PagerTabStripOptions.swift */, ); path = Sources; sourceTree = ""; @@ -223,11 +245,13 @@ buildActionMask = 2147483647; files = ( CBA0A1FD1C502DA300C5748C /* BarView.swift in Sources */, + 281BFDC31C511F120090C26F /* PagerTabStripOptions.swift in Sources */, CBA0A1FC1C502DA300C5748C /* BarPagerTabStripViewController.swift in Sources */, CB71C6EE1C4EB988008EC806 /* SegmentedPagerTabStripViewController.swift in Sources */, 28E098BE1C5002D90083B788 /* PagerTabStripError.swift in Sources */, + 281BFDC11C511C420090C26F /* ChildItemInfo.swift in Sources */, CB86ED6B1C4D6E6C00DA463B /* PagerTabStripViewController.swift in Sources */, - 28E098C01C5003130083B788 /* PagerTabStripSwipeDirection.swift in Sources */, + 28E098C01C5003130083B788 /* SwipeDirection.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };