@@ -70,9 +70,6 @@ class UIPageViewControllerImpl extends UIPageViewController {
7070 scrollView : UIScrollView ;
7171 tabBarDelegate : MDCTabBarDelegateImpl ;
7272
73- private _backgroundColor = majorVersion <= 12 ? UIColor . whiteColor : UIColor . systemBackgroundColor ;
74- private _blueColor = majorVersion <= 12 ? UIColor . blueColor : UIColor . systemBlueColor ;
75- private _labelColor = majorVersion <= 12 ? UIColor . blackColor : UIColor . labelColor ;
7673 private _owner : WeakRef < Tabs > ;
7774
7875 public static initWithOwner ( owner : WeakRef < Tabs > ) : UIPageViewControllerImpl {
@@ -93,12 +90,17 @@ class UIPageViewControllerImpl extends UIPageViewController {
9390 }
9491
9592 tabBar . delegate = this . tabBarDelegate = MDCTabBarDelegateImpl . initWithOwner ( new WeakRef ( owner ) ) ;
96- tabBar . tintColor = this . _blueColor ;
97- tabBar . barTintColor = this . _backgroundColor ;
98- tabBar . setTitleColorForState ( this . _labelColor , MDCTabBarItemState . Normal ) ;
99- tabBar . setTitleColorForState ( this . _labelColor , MDCTabBarItemState . Selected ) ;
10093
101- if ( majorVersion >= 13 ) {
94+ if ( majorVersion <= 12 ) {
95+ tabBar . tintColor = UIColor . blueColor ;
96+ tabBar . barTintColor = UIColor . whiteColor ;
97+ tabBar . setTitleColorForState ( UIColor . blackColor , MDCTabBarItemState . Normal ) ;
98+ tabBar . setTitleColorForState ( UIColor . blackColor , MDCTabBarItemState . Selected ) ;
99+ } else {
100+ tabBar . tintColor = UIColor . systemBlueColor ;
101+ tabBar . barTintColor = UIColor . systemBackgroundColor ;
102+ tabBar . setTitleColorForState ( UIColor . labelColor , MDCTabBarItemState . Normal ) ;
103+ tabBar . setTitleColorForState ( UIColor . labelColor , MDCTabBarItemState . Selected ) ;
102104 tabBar . inkColor = UIColor . clearColor ;
103105 }
104106
0 commit comments