| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -82,26 +82,24 @@ class UIPageViewControllerImpl extends UIPageViewController { | |||
| 82 | 82 | public viewDidLoad(): void { | |
| 83 | 83 | const owner = this._owner.get(); | |
| 84 | 84 | ||
| 85 | - if (owner.tabStrip) { | ||
| 86 | - const tabBarItems = owner.tabBarItems; | ||
| 87 | - const tabBar = MDCTabBar.alloc().initWithFrame(this.view.bounds); | ||
| 88 | - | ||
| 89 | - if (tabBarItems && tabBarItems.length) { | ||
| 90 | - tabBar.items = NSArray.arrayWithArray(tabBarItems); | ||
| 91 | - } | ||
| 85 | + const tabBarItems = owner.tabBarItems; | ||
| 86 | + const tabBar = MDCTabBar.alloc().initWithFrame(this.view.bounds); | ||
| 92 | 87 | ||
| 93 | - tabBar.delegate = this.tabBarDelegate = MDCTabBarDelegateImpl.initWithOwner(new WeakRef(owner)); | ||
| 94 | - tabBar.tintColor = UIColor.blueColor; | ||
| 95 | - tabBar.barTintColor = UIColor.whiteColor; | ||
| 96 | - tabBar.setTitleColorForState(UIColor.blackColor, MDCTabBarItemState.Normal); | ||
| 97 | - tabBar.setTitleColorForState(UIColor.blackColor, MDCTabBarItemState.Selected); | ||
| 98 | - tabBar.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleBottomMargin; | ||
| 99 | - tabBar.alignment = MDCTabBarAlignment.Leading; | ||
| 100 | - tabBar.sizeToFit(); | ||
| 101 | - | ||
| 102 | - this.tabBar = tabBar; | ||
| 103 | - this.view.addSubview(tabBar); | ||
| 88 | + if (tabBarItems && tabBarItems.length) { | ||
| 89 | + tabBar.items = NSArray.arrayWithArray(tabBarItems); | ||
| 104 | 90 | } | |
| 91 | + | ||
| 92 | + tabBar.delegate = this.tabBarDelegate = MDCTabBarDelegateImpl.initWithOwner(new WeakRef(owner)); | ||
| 93 | + tabBar.tintColor = UIColor.blueColor; | ||
| 94 | + tabBar.barTintColor = UIColor.whiteColor; | ||
| 95 | + tabBar.setTitleColorForState(UIColor.blackColor, MDCTabBarItemState.Normal); | ||
| 96 | + tabBar.setTitleColorForState(UIColor.blackColor, MDCTabBarItemState.Selected); | ||
| 97 | + tabBar.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleBottomMargin; | ||
| 98 | + tabBar.alignment = MDCTabBarAlignment.Leading; | ||
| 99 | + tabBar.sizeToFit(); | ||
| 100 | + | ||
| 101 | + this.tabBar = tabBar; | ||
| 102 | + this.view.addSubview(tabBar); | ||
| 105 | 103 | } | |
| 106 | 104 | ||
| 107 | 105 | public viewWillAppear(animated: boolean): void { | |
@@ -159,6 +157,8 @@ class UIPageViewControllerImpl extends UIPageViewController { | |||
| 159 | 157 | } | |
| 160 | 158 | ||
| 161 | 159 | this.tabBar.frame = CGRectMake(0, tabBarTop, this.tabBar.frame.size.width, tabBarHeight); | |
| 160 | + } else { | ||
| 161 | + this.tabBar.hidden = true; | ||
| 162 | 162 | } | |
| 163 | 163 | ||
| 164 | 164 | const subViews: NSArray<UIView> = this.view.subviews; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments