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
8152043b
Commit
8152043b
authored
Mar 08, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated NavigationBar project
parent
5e6d8784
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
Examples/Programmatic/App/App/AppSearchBarViewController.swift
+3
-1
Examples/Programmatic/App/App/FeedViewController.swift
+2
-0
Examples/Programmatic/NavigationBar/NavigationBar/ViewController.swift
+0
-2
Sources/NavigationBar.swift
+6
-7
No files found.
Examples/Programmatic/App/App/AppSearchBarViewController.swift
View file @
8152043b
...
...
@@ -112,9 +112,11 @@ class AppSearchBarViewController: SearchBarViewController {
searchBarView
.
placeholderTextColor
=
MaterialColor
.
grey
.
darken4
searchBarView
.
textField
.
font
=
RobotoFont
.
regular
searchBarView
.
textField
.
delegate
=
self
searchBarView
.
contentInset
.
left
=
8
searchBarView
.
contentInset
.
right
=
8
searchBarView
.
clearButton
=
clearButton
searchBarView
.
righ
tControls
=
[
backButton
]
searchBarView
.
lef
tControls
=
[
backButton
]
}
}
...
...
Examples/Programmatic/App/App/FeedViewController.swift
View file @
8152043b
...
...
@@ -70,6 +70,8 @@ class FeedViewController: UIViewController {
navigationbar
.
backgroundColor
=
MaterialColor
.
blue
.
base
navigationbar
.
backButton
.
tintColor
=
MaterialColor
.
white
}
collectionView
.
reloadData
()
}
override
func
viewWillTransitionToSize
(
size
:
CGSize
,
withTransitionCoordinator
coordinator
:
UIViewControllerTransitionCoordinator
)
{
...
...
Examples/Programmatic/NavigationBar/NavigationBar/ViewController.swift
View file @
8152043b
...
...
@@ -109,8 +109,6 @@ class ViewController: UIViewController {
view
.
addSubview
(
navigationBar
)
menuButton
.
backgroundColor
=
MaterialColor
.
yellow
.
accent1
let
item
:
UINavigationItem
=
UINavigationItem
()
item
.
titleLabel
=
titleLabel
item
.
leftControls
=
[
menuButton
]
...
...
Sources/NavigationBar.swift
View file @
8152043b
...
...
@@ -250,11 +250,11 @@ public class NavigationBar : UINavigationBar {
public
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
if
let
item
:
UINavigationItem
=
backItem
{
item
.
titleView
?
.
grid
.
reloadLayout
()
}
else
if
let
item
:
UINavigationItem
=
topItem
{
if
let
item
:
UINavigationItem
=
topItem
{
layoutNavigationItem
(
item
)
}
topItem
?
.
titleView
?
.
grid
.
reloadLayout
()
}
public
override
func
pushNavigationItem
(
item
:
UINavigationItem
,
animated
:
Bool
)
{
...
...
@@ -311,14 +311,13 @@ public class NavigationBar : UINavigationBar {
if
32
>=
height
||
nil
==
item
.
detailLabel
{
t
.
font
=
t
.
font
?
.
fontWithSize
(
20
)
item
.
titleView
!.
grid
.
axis
.
rows
=
1
item
.
detailLabel
?
.
hidden
=
true
}
else
if
let
d
:
UILabel
=
item
.
detailLabel
{
d
.
grid
.
rows
=
1
d
.
hidden
=
false
d
.
font
=
d
.
font
.
fontWithSize
(
12
)
t
.
font
=
t
.
font
.
fontWithSize
(
17
)
item
.
titleView
!.
addSubview
(
d
)
item
.
titleView
!.
grid
.
axis
.
rows
=
2
item
.
titleView
!.
grid
.
views
?
.
append
(
d
)
...
...
@@ -367,7 +366,7 @@ public class NavigationBar : UINavigationBar {
backButtonImage
=
nil
backgroundColor
=
MaterialColor
.
white
depth
=
.
Depth1
contentInset
=
UIEdgeInsetsMake
(
2
,
6
,
2
,
6
)
contentInset
=
UIEdgeInsetsMake
(
2
,
2
,
2
,
2
)
prepareBackButton
()
}
...
...
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