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
1986b113
Commit
1986b113
authored
Sep 29, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
experimental: updated NavigationBarView
parent
77cd0908
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
13 deletions
+33
-13
MaterialKit.xcodeproj/project.pbxproj
+4
-0
Source/MaterialStatusBarStyle.swift
+22
-0
Source/MaterialTheme.swift
+1
-1
Source/NavigationBarView.swift
+6
-12
No files found.
MaterialKit.xcodeproj/project.pbxproj
View file @
1986b113
...
...
@@ -44,6 +44,7 @@
963832421B88DFD80015F710
/* MaterialKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832361B88DFD80015F710
/* MaterialKit.framework */
;
};
9638325A1B88E31A0015F710
/* MaterialKitTests.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832581B88E31A0015F710
/* MaterialKitTests.swift */
;
};
964B17B41BBA447F002A9CA0
/* MaterialLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B31BBA447F002A9CA0
/* MaterialLayout.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
964B17B61BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
964B17B51BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
9A94D0FA1B895EA500F586A5
/* LICENSE in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832631B88E5BF0015F710
/* LICENSE */
;
};
9A94D0FB1B895EA500F586A5
/* Roboto-Regular.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9AAC38591B8956E300FE6B2D
/* Roboto-Regular.ttf */
;
};
9A94D0FC1B895EA500F586A5
/* Roboto-Medium.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9AAC38571B8956CF00FE6B2D
/* Roboto-Medium.ttf */
;
};
...
...
@@ -90,6 +91,7 @@
963832591B88E31A0015F710
/* Info.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
963832631B88E5BF0015F710
/* LICENSE */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text
;
path
=
LICENSE
;
sourceTree
=
"<group>"
;
};
964B17B31BBA447F002A9CA0
/* MaterialLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialLayout.swift
;
sourceTree
=
"<group>"
;
};
964B17B51BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialStatusBarStyle.swift
;
sourceTree
=
"<group>"
;
};
9AAC38551B8956C500FE6B2D
/* Roboto-Light.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Light.ttf"
;
sourceTree
=
"<group>"
;
};
9AAC38571B8956CF00FE6B2D
/* Roboto-Medium.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Medium.ttf"
;
sourceTree
=
"<group>"
;
};
9AAC38591B8956E300FE6B2D
/* Roboto-Regular.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Regular.ttf"
;
sourceTree
=
"<group>"
;
};
...
...
@@ -251,6 +253,7 @@
65BDD1691BB7146B006F7F2B
/* MaterialBorder.swift */
,
65BDD16B1BB88D1A006F7F2B
/* MaterialShape.swift */
,
65BDD1761BB98E31006F7F2B
/* MaterialSize.swift */
,
964B17B51BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift */
,
);
name
=
Theme
;
sourceTree
=
"<group>"
;
...
...
@@ -404,6 +407,7 @@
65BDD1571BB6FC82006F7F2B
/* MaterialButton.swift in Sources */
,
65BDD17C1BB99E29006F7F2B
/* FabButton.swift in Sources */
,
65BDD16E1BB899F2006F7F2B
/* MaterialPulseView.swift in Sources */
,
964B17B61BBA4BEA002A9CA0
/* MaterialStatusBarStyle.swift in Sources */
,
65BDD1741BB8D443006F7F2B
/* MaterialAnimation.swift in Sources */
,
65BDD14B1BB5DD02006F7F2B
/* MaterialFont.swift in Sources */
,
65BDD16A1BB7146B006F7F2B
/* MaterialBorder.swift in Sources */
,
...
...
Source/MaterialStatusBarStyle.swift
0 → 100644
View file @
1986b113
//
// Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
public
enum
MaterialStatusBarStyle
:
Int
{
case
Default
case
LightContent
}
Source/MaterialTheme.swift
View file @
1986b113
...
...
@@ -125,7 +125,7 @@ public extension MaterialTheme.navigation {
// color
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
blue
.
accent3
public
static
var
lightContentStatusBar
:
Bool
=
true
public
static
var
statusBarStyle
:
MaterialStatusBarStyle
=
.
LightContent
// interaction
public
static
var
userInteractionEnabled
:
Bool
=
true
...
...
Source/NavigationBarView.swift
View file @
1986b113
...
...
@@ -20,11 +20,11 @@ import UIKit
public
class
NavigationBarView
:
MaterialView
{
/**
:name:
lightContentStatusBar
:name:
statusBarStyle
*/
public
var
lightContentStatusBar
:
Bool
=
MaterialTheme
.
navigation
.
lightContentStatusBar
{
public
var
statusBarStyle
:
MaterialStatusBarStyle
!
{
didSet
{
UIApplication
.
sharedApplication
()
.
setStatusBarStyle
(
lightContentStatusBar
?
.
LightContent
:
.
Default
,
animated
:
true
)
UIApplication
.
sharedApplication
()
.
setStatusBarStyle
(
.
LightContent
==
statusBarStyle
?
.
LightContent
:
.
Default
,
animated
:
true
)
}
}
...
...
@@ -40,11 +40,7 @@ public class NavigationBarView: MaterialView {
/**
:name: contentInsetsRef
*/
public
var
contentInsetsRef
:
MaterialInsetsType
!
{
didSet
{
layoutSubviews
()
}
}
public
var
contentInsetsRef
:
MaterialInsetsType
!
/**
:name: titleLabel
...
...
@@ -70,7 +66,6 @@ public class NavigationBarView: MaterialView {
*/
public
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
contentInsets
=
.
Inset3
}
/**
...
...
@@ -78,7 +73,6 @@ public class NavigationBarView: MaterialView {
*/
public
convenience
init
()
{
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigation
.
x
,
MaterialTheme
.
navigation
.
y
,
MaterialTheme
.
navigation
.
width
,
MaterialTheme
.
navigation
.
height
))
contentInsets
=
.
Inset3
}
/**
...
...
@@ -87,7 +81,6 @@ public class NavigationBarView: MaterialView {
public
convenience
init
?(
titleLabel
:
MaterialLabel
?
=
nil
)
{
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigation
.
x
,
MaterialTheme
.
navigation
.
y
,
MaterialTheme
.
navigation
.
width
,
MaterialTheme
.
navigation
.
height
))
self
.
prepareProperties
(
titleLabel
)
}
/**
...
...
@@ -117,7 +110,8 @@ public class NavigationBarView: MaterialView {
super
.
prepareView
()
userInteractionEnabled
=
MaterialTheme
.
navigation
.
userInteractionEnabled
backgroundColor
=
MaterialTheme
.
navigation
.
backgroudColor
lightContentStatusBar
=
MaterialTheme
.
navigation
.
lightContentStatusBar
statusBarStyle
=
MaterialTheme
.
navigation
.
statusBarStyle
contentInsets
=
.
Inset3
contentsRect
=
MaterialTheme
.
navigation
.
contentsRect
contentsCenter
=
MaterialTheme
.
navigation
.
contentsCenter
...
...
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