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
41ca8398
Commit
41ca8398
authored
May 27, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated projects for the adjustments made to BarViews
parent
5586d0ae
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
11 deletions
+7
-11
Examples/Programmatic/App/App/AppSearchBarViewController.swift
+1
-1
Examples/Programmatic/CaptureView/CaptureView/ViewController.swift
+0
-1
Examples/Programmatic/SearchBarController/SearchBarController/AppSearchBarController.swift
+1
-1
Examples/Programmatic/ToolbarController/ToolbarController/AppToolbarController.swift
+1
-1
Examples/Storyboards/Toolbar/Toolbar/ViewController.swift
+4
-7
No files found.
Examples/Programmatic/App/App/AppSearchBarViewController.swift
View file @
41ca8398
...
@@ -45,7 +45,7 @@ class AppSearchBarController: SearchBarController {
...
@@ -45,7 +45,7 @@ class AppSearchBarController: SearchBarController {
override
func
viewWillAppear
(
animated
:
Bool
)
{
override
func
viewWillAppear
(
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
super
.
viewWillAppear
(
animated
)
s
earchBar
.
s
tatusBarStyle
=
.
Default
statusBarStyle
=
.
Default
sideNavigationController
?
.
enabled
=
false
sideNavigationController
?
.
enabled
=
false
}
}
...
...
Examples/Programmatic/CaptureView/CaptureView/ViewController.swift
View file @
41ca8398
...
@@ -235,7 +235,6 @@ class ViewController: UIViewController, CaptureViewDelegate, CaptureSessionDeleg
...
@@ -235,7 +235,6 @@ class ViewController: UIViewController, CaptureViewDelegate, CaptureSessionDeleg
private
func
prepareToolbar
()
{
private
func
prepareToolbar
()
{
toolbar
.
backgroundColor
=
nil
toolbar
.
backgroundColor
=
nil
toolbar
.
depth
=
.
None
toolbar
.
depth
=
.
None
toolbar
.
statusBarStyle
=
.
LightContent
// Title label.
// Title label.
let
titleLabel
:
UILabel
=
UILabel
()
let
titleLabel
:
UILabel
=
UILabel
()
...
...
Examples/Programmatic/SearchBarController/SearchBarController/AppSearchBarController.swift
View file @
41ca8398
...
@@ -40,6 +40,7 @@ class AppSearchBarController: SearchBarController {
...
@@ -40,6 +40,7 @@ class AppSearchBarController: SearchBarController {
/// Prepares the view.
/// Prepares the view.
override
func
prepareView
()
{
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
statusBarStyle
=
.
Default
prepareSearchBar
()
prepareSearchBar
()
}
}
...
@@ -65,7 +66,6 @@ class AppSearchBarController: SearchBarController {
...
@@ -65,7 +66,6 @@ class AppSearchBarController: SearchBarController {
"View controller-based status bar appearance = NO"
"View controller-based status bar appearance = NO"
to your info.plist file and set the following property.
to your info.plist file and set the following property.
*/
*/
searchBar
.
statusBarStyle
=
.
Default
searchBar
.
textField
.
delegate
=
self
searchBar
.
textField
.
delegate
=
self
searchBar
.
leftControls
=
[
backButton
]
searchBar
.
leftControls
=
[
backButton
]
searchBar
.
rightControls
=
[
moreButton
]
searchBar
.
rightControls
=
[
moreButton
]
...
...
Examples/Programmatic/ToolbarController/ToolbarController/AppToolbarController.swift
View file @
41ca8398
...
@@ -40,6 +40,7 @@ class AppToolbarController: ToolbarController {
...
@@ -40,6 +40,7 @@ class AppToolbarController: ToolbarController {
/// Prepares the view.
/// Prepares the view.
override
func
prepareView
()
{
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
statusBarStyle
=
.
LightContent
prepareToolbar
()
prepareToolbar
()
}
}
...
@@ -86,7 +87,6 @@ class AppToolbarController: ToolbarController {
...
@@ -86,7 +87,6 @@ class AppToolbarController: ToolbarController {
searchButton
.
setImage
(
image
,
forState
:
.
Highlighted
)
searchButton
.
setImage
(
image
,
forState
:
.
Highlighted
)
searchButton
.
addTarget
(
self
,
action
:
#selector(
handleSearchButton
)
,
forControlEvents
:
.
TouchUpInside
)
searchButton
.
addTarget
(
self
,
action
:
#selector(
handleSearchButton
)
,
forControlEvents
:
.
TouchUpInside
)
toolbar
.
statusBarStyle
=
.
LightContent
toolbar
.
backgroundColor
=
MaterialColor
.
blue
.
base
toolbar
.
backgroundColor
=
MaterialColor
.
blue
.
base
toolbar
.
leftControls
=
[
menuButton
]
toolbar
.
leftControls
=
[
menuButton
]
toolbar
.
rightControls
=
[
switchControl
,
searchButton
]
toolbar
.
rightControls
=
[
switchControl
,
searchButton
]
...
...
Examples/Storyboards/Toolbar/Toolbar/ViewController.swift
View file @
41ca8398
...
@@ -49,13 +49,14 @@ class ViewController: UIViewController {
...
@@ -49,13 +49,14 @@ class ViewController: UIViewController {
}
}
/// Adjusts the Toolbar height to the correct height based on the orientation value.
/// Adjusts the Toolbar height to the correct height based on the orientation value.
private
func
adjustToOrientation
(
toI
nterfaceOrientation
:
UIInterfaceOrientation
)
{
private
func
adjustToOrientation
(
i
nterfaceOrientation
:
UIInterfaceOrientation
)
{
toolbar
.
contentInset
.
top
=
.
iPad
==
MaterialDevice
.
type
||
UIInterfaceOrientationIsPortrait
(
toInterfaceOrientation
)
?
20
:
4
toolbar
.
grid
.
layoutInset
.
top
=
.
iPad
==
MaterialDevice
.
type
||
UIInterfaceOrientationIsPortrait
(
interfaceOrientation
)
?
20
:
0
toolbarHeightConstraint
?
.
constant
=
toolbar
.
intrinsicContentSize
()
.
height
toolbarHeightConstraint
?
.
constant
=
toolbar
.
intrinsicContentSize
()
.
height
+
toolbar
.
grid
.
layoutInset
.
top
}
}
/// General preparation statements.
/// General preparation statements.
private
func
prepareView
()
{
private
func
prepareView
()
{
MaterialDevice
.
statusBarStyle
=
.
LightContent
view
.
backgroundColor
=
MaterialColor
.
white
view
.
backgroundColor
=
MaterialColor
.
white
}
}
...
@@ -64,10 +65,6 @@ class ViewController: UIViewController {
...
@@ -64,10 +65,6 @@ class ViewController: UIViewController {
// Stylize.
// Stylize.
toolbar
.
backgroundColor
=
MaterialColor
.
indigo
.
darken1
toolbar
.
backgroundColor
=
MaterialColor
.
indigo
.
darken1
// To lighten the status bar add the "View controller-based status bar appearance = NO"
// to your info.plist file and set the following property.
toolbar
.
statusBarStyle
=
.
LightContent
// Title label.
// Title label.
toolbar
.
title
=
"Material"
toolbar
.
title
=
"Material"
toolbar
.
titleLabel
.
textColor
=
MaterialColor
.
white
toolbar
.
titleLabel
.
textColor
=
MaterialColor
.
white
...
...
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