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
58089e3d
Commit
58089e3d
authored
Feb 17, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated NavigationBarView Storyboard example
parent
8fbe2490
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
11 deletions
+21
-11
Examples/Programmatic/MaterialLayout/MaterialLayout/ViewController.swift
+2
-0
Examples/Programmatic/SideNavigationViewController/SideNavigationViewController.xcodeproj/project.pbxproj
+0
-6
Examples/Storyboards/NavigationBarView/NavigationBarView/Base.lproj/Main.storyboard
+5
-2
Examples/Storyboards/NavigationBarView/NavigationBarView/ViewController.swift
+14
-3
No files found.
Examples/Programmatic/MaterialLayout/MaterialLayout/ViewController.swift
View file @
58089e3d
...
...
@@ -46,6 +46,8 @@ class ViewController: UIViewController {
}
/// General preparation statements are placed here.
@IBOutlet
weak
var
heightConstraint
:
NSLayoutConstraint
!
@IBOutlet
weak
var
navigationBarViewConstraint
:
NavigationBarView
!
private
func
prepareView
()
{
view
.
backgroundColor
=
MaterialColor
.
white
}
...
...
Examples/Programmatic/SideNavigationViewController/SideNavigationViewController.xcodeproj/project.pbxproj
View file @
58089e3d
...
...
@@ -13,8 +13,6 @@
9642FA251C1B50E700022BC6
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA231C1B50E700022BC6
/* LaunchScreen.storyboard */
;
};
9642FA331C1B909700022BC6
/* LeftViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA321C1B909700022BC6
/* LeftViewController.swift */
;
};
967585381C569AA9001E4268
/* RightViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
967585371C569AA9001E4268
/* RightViewController.swift */
;
};
96A71F3C1C739D1E00C0C4AE
/* Material.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96A71F3B1C739D1E00C0C4AE
/* Material.framework */
;
};
96A71F3D1C739D1E00C0C4AE
/* Material.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96A71F3B1C739D1E00C0C4AE
/* Material.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
96A71F471C74AD0700C0C4AE
/* FeedViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96A71F461C74AD0700C0C4AE
/* FeedViewController.swift */
;
};
/* End PBXBuildFile section */
...
...
@@ -25,7 +23,6 @@
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
96A71F3D1C739D1E00C0C4AE
/* Material.framework in Embed Frameworks */
,
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
...
...
@@ -41,7 +38,6 @@
9642FA261C1B50E700022BC6
/* Info.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
9642FA321C1B909700022BC6
/* LeftViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LeftViewController.swift
;
sourceTree
=
"<group>"
;
};
967585371C569AA9001E4268
/* RightViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RightViewController.swift
;
sourceTree
=
"<group>"
;
};
96A71F3B1C739D1E00C0C4AE
/* Material.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
name
=
Material.framework
;
path
=
"/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"
;
sourceTree
=
"<absolute>"
;
};
96A71F461C74AD0700C0C4AE
/* FeedViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FeedViewController.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
...
...
@@ -50,7 +46,6 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
96A71F3C1C739D1E00C0C4AE
/* Material.framework in Frameworks */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -60,7 +55,6 @@
9642FA0E1C1B50E700022BC6
=
{
isa
=
PBXGroup
;
children
=
(
96A71F3B1C739D1E00C0C4AE
/* Material.framework */
,
9642FA191C1B50E700022BC6
/* SideNavigationViewController */
,
9642FA181C1B50E700022BC6
/* Products */
,
);
...
...
Examples/Storyboards/NavigationBarView/NavigationBarView/Base.lproj/Main.storyboard
View file @
58089e3d
...
...
@@ -17,9 +17,12 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"600"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
ambiguous=
"YES"
misplaced=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"est-za-GAc"
customClass=
"NavigationBarView"
customModule=
"Material"
>
<view
contentMode=
"scaleToFill"
ambiguous=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"est-za-GAc"
customClass=
"NavigationBarView"
customModule=
"Material"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"64"
/>
<color
key=
"backgroundColor"
red=
"0.39222975830000001"
green=
"0.2440954615"
blue=
"0.68699765469999996"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"64"
id=
"dve-99-fA0"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
...
...
@@ -29,7 +32,7 @@
</constraints>
</view>
<connections>
<outlet
property=
"navigationBarView"
destination=
"est-za-GAc"
id=
"
yru-pV-frB
"
/>
<outlet
property=
"navigationBarView"
destination=
"est-za-GAc"
id=
"
3ly-Ta-1qf
"
/>
</connections>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"dkx-z0-nzr"
sceneMemberID=
"firstResponder"
/>
...
...
Examples/Storyboards/NavigationBarView/NavigationBarView/ViewController.swift
View file @
58089e3d
...
...
@@ -34,7 +34,18 @@ import Material
class
ViewController
:
UIViewController
{
@IBOutlet
weak
var
navigationBarView
:
NavigationBarView
!
@IBOutlet
weak
var
navigationBarViewHeightConstraint
:
NSLayoutConstraint
?
override
func
willRotateToInterfaceOrientation
(
toInterfaceOrientation
:
UIInterfaceOrientation
,
duration
:
NSTimeInterval
)
{
// if landscape
if
UIInterfaceOrientationIsLandscape
(
toInterfaceOrientation
)
{
navigationBarViewHeightConstraint
?
.
constant
=
44
}
else
{
// else portrait
navigationBarViewHeightConstraint
?
.
constant
=
64
}
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepareView
()
...
...
@@ -43,14 +54,14 @@ class ViewController: UIViewController {
/// General preparation statements.
private
func
prepareView
()
{
view
.
backgroundColor
=
MaterialColor
.
white
view
.
backgroundColor
=
MaterialColor
.
white
}
/// Prepare the navigationBarView.
func
prepareNavigationBarView
()
{
// Stylize.
navigationBarView
.
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.
navigationBarView
.
statusBarStyle
=
.
LightContent
...
...
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