Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
24d2521d
Unverified
Commit
24d2521d
authored
Jun 06, 2016
by
M. Porooshani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the Example app to support hidesBottomBarWhenPushed
parent
f099182d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
Examples/Programmatic/App/App/AppDelegate.swift
+1
-1
Examples/Programmatic/App/App/AppMenuController.swift
+2
-9
Examples/Programmatic/App/App/AppNavigationController.swift
+9
-0
Examples/Programmatic/App/App/ItemViewController.swift
+1
-0
No files found.
Examples/Programmatic/App/App/AppDelegate.swift
View file @
24d2521d
...
...
@@ -43,7 +43,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
menuController
.
edgesForExtendedLayout
=
.
None
let
bottomNavigationController
:
BottomNavigationController
=
BottomNavigationController
()
bottomNavigationController
.
viewControllers
=
[
menu
Controller
,
VideoViewController
(),
PhotoViewController
()]
bottomNavigationController
.
viewControllers
=
[
/*menuController*/
navigation
Controller
,
VideoViewController
(),
PhotoViewController
()]
bottomNavigationController
.
selectedIndex
=
0
bottomNavigationController
.
tabBar
.
tintColor
=
MaterialColor
.
white
bottomNavigationController
.
tabBar
.
backgroundColor
=
MaterialColor
.
grey
.
darken4
...
...
Examples/Programmatic/App/App/AppMenuController.swift
View file @
24d2521d
...
...
@@ -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.
...
...
Examples/Programmatic/App/App/AppNavigationController.swift
View file @
24d2521d
...
...
@@ -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
)
}
}
Examples/Programmatic/App/App/ItemViewController.swift
View file @
24d2521d
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment