File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,7 @@ import UIKit
1111open class TabPageViewController : UIPageViewController {
1212 open var isInfinity : Bool = false
1313 open var option : TabPageOption = TabPageOption ( )
14- open var tabItems : [ ( viewController: UIViewController , title: String ) ] = [ ] {
15- didSet {
16- tabItemsCount = tabItems. count
17- }
18- }
14+ open var tabItems : [ ( viewController: UIViewController , title: String ) ] = [ ]
1915
2016 var currentIndex : Int ? {
2117 guard let viewController = viewControllers? . first else {
@@ -24,7 +20,9 @@ open class TabPageViewController: UIPageViewController {
2420 return tabItems. map { $0. viewController } . index ( of: viewController)
2521 }
2622 fileprivate var beforeIndex : Int = 0
27- fileprivate var tabItemsCount = 0
23+ fileprivate var tabItemsCount : Int {
24+ return tabItems. count
25+ }
2826 fileprivate var defaultContentOffsetX : CGFloat {
2927 return self . view. bounds. width
3028 }
You can’t perform that action at this time.
0 commit comments