Commit 24d2521d by M. Porooshani

Updated the Example app to support hidesBottomBarWhenPushed

parent f099182d
......@@ -43,7 +43,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
menuController.edgesForExtendedLayout = .None
let bottomNavigationController: BottomNavigationController = BottomNavigationController()
bottomNavigationController.viewControllers = [menuController, VideoViewController(), PhotoViewController()]
bottomNavigationController.viewControllers = [/*menuController*/navigationController, VideoViewController(), PhotoViewController()]
bottomNavigationController.selectedIndex = 0
bottomNavigationController.tabBar.tintColor = MaterialColor.white
bottomNavigationController.tabBar.backgroundColor = MaterialColor.grey.darken4
......
......@@ -48,8 +48,7 @@ class AppMenuController: MenuController {
}
override init(rootViewController: UIViewController) {
super.init(rootViewController: rootViewController)
prepareTabBarItem()
super.init(rootViewController: rootViewController)
}
override func viewDidLoad() {
......@@ -143,13 +142,7 @@ class AppMenuController: MenuController {
view.layout.size(menuView, width: baseSize.width, height: baseSize.height)
view.layout.alignFromBottomRight(menuView, bottom: menuViewInset, right: menuViewInset)
}
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.image = MaterialIcon.cm.photoLibrary
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.white, forState: .Selected)
}
}
/// MenuViewDelegate.
......
......@@ -35,6 +35,7 @@ class AppNavigationController: NavigationController {
override func viewDidLoad() {
super.viewDidLoad()
prepareNavigationBar()
prepareTabBarItem()
}
/// Prepares the navigationBar
......@@ -42,4 +43,12 @@ class AppNavigationController: NavigationController {
navigationBar.tintColor = MaterialColor.white
navigationBar.backgroundColor = MaterialColor.blue.base
}
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.image = MaterialIcon.cm.photoLibrary
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.white, forState: .Selected)
}
}
......@@ -57,6 +57,7 @@ class ItemViewController: UIViewController {
convenience init(dataSource: MaterialDataSourceItem) {
self.init(nibName: nil, bundle: nil)
self.dataSource = dataSource
hidesBottomBarWhenPushed = true
}
required init?(coder aDecoder: NSCoder) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment