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
e097bb28
Commit
e097bb28
authored
Mar 03, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed NavigationBarViewDelegate and SearchBarViewDelegate
parent
bc09da94
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
42 deletions
+11
-42
Examples/Programmatic/NavigationBarView/NavigationBarView.xcodeproj/project.pbxproj
+0
-6
Examples/Programmatic/NavigationBarView/NavigationBarView/ViewController.swift
+2
-11
Examples/Programmatic/SearchBarView/SearchBarView/ViewController.swift
+1
-11
Examples/Programmatic/SearchBarViewController/SearchBarViewController/AppSearchBarViewController.swift
+1
-1
Examples/Storyboards/NavigationBarView/NavigationBarView/ViewController.swift
+6
-2
Sources/NavigationBarView.swift
+1
-6
Sources/SearchBarView.swift
+0
-5
No files found.
Examples/Programmatic/NavigationBarView/NavigationBarView.xcodeproj/project.pbxproj
View file @
e097bb28
...
...
@@ -7,8 +7,6 @@
objects
=
{
/* Begin PBXBuildFile section */
9656265B1C87F57C004ADEF7
/* Material.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9656265A1C87F57C004ADEF7
/* Material.framework */
;
};
9656265C1C87F57C004ADEF7
/* Material.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9656265A1C87F57C004ADEF7
/* Material.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
96D88C831C132C1800B91418
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C821C132C1800B91418
/* AppDelegate.swift */
;
};
96D88C851C132C1800B91418
/* ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C841C132C1800B91418
/* ViewController.swift */
;
};
96D88C8A1C132C1800B91418
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C891C132C1800B91418
/* Assets.xcassets */
;
};
...
...
@@ -22,7 +20,6 @@
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
9656265C1C87F57C004ADEF7
/* Material.framework in Embed Frameworks */
,
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
...
...
@@ -30,7 +27,6 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
9656265A1C87F57C004ADEF7
/* 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>"
;
};
96D88C7F1C132C1800B91418
/* NavigationBarView.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
NavigationBarView.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
96D88C821C132C1800B91418
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
96D88C841C132C1800B91418
/* ViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -44,7 +40,6 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
9656265B1C87F57C004ADEF7
/* Material.framework in Frameworks */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -54,7 +49,6 @@
96D88C761C132C1800B91418
=
{
isa
=
PBXGroup
;
children
=
(
9656265A1C87F57C004ADEF7
/* Material.framework */
,
96D88C811C132C1800B91418
/* NavigationBarView */
,
96D88C801C132C1800B91418
/* Products */
,
);
...
...
Examples/Programmatic/NavigationBarView/NavigationBarView/ViewController.swift
View file @
e097bb28
...
...
@@ -72,8 +72,8 @@ class ViewController: UIViewController {
// Menu button.
let
menuButton
:
FlatButton
=
FlatButton
()
menuButton
.
pulseColor
=
MaterialColor
.
white
menuButton
.
pulseScale
=
false
menuButton
.
pulseColor
=
MaterialColor
.
white
menuButton
.
setImage
(
image
,
forState
:
.
Normal
)
menuButton
.
setImage
(
image
,
forState
:
.
Highlighted
)
...
...
@@ -83,8 +83,8 @@ class ViewController: UIViewController {
// Search button.
image
=
UIImage
(
named
:
"ic_search_white"
)
let
searchButton
:
FlatButton
=
FlatButton
()
searchButton
.
pulseColor
=
MaterialColor
.
white
searchButton
.
pulseScale
=
false
searchButton
.
pulseColor
=
MaterialColor
.
white
searchButton
.
setImage
(
image
,
forState
:
.
Normal
)
searchButton
.
setImage
(
image
,
forState
:
.
Highlighted
)
...
...
@@ -95,7 +95,6 @@ class ViewController: UIViewController {
*/
navigationBarView
.
statusBarStyle
=
.
LightContent
navigationBarView
.
delegate
=
self
navigationBarView
.
backgroundColor
=
MaterialColor
.
blue
.
base
navigationBarView
.
titleLabel
=
titleLabel
navigationBarView
.
detailLabel
=
detailLabel
...
...
@@ -105,11 +104,3 @@ class ViewController: UIViewController {
view
.
addSubview
(
navigationBarView
)
}
}
/// NavigationBarViewDelegate methods.
extension
ViewController
:
NavigationBarViewDelegate
{
func
navigationBarViewDidChangeLayout
(
navigationBarView
:
NavigationBarView
)
{
print
(
"Updated Frame:
\(
navigationBarView
.
frame
)
"
)
}
}
Examples/Programmatic/SearchBarView/SearchBarView/ViewController.swift
View file @
e097bb28
...
...
@@ -91,12 +91,11 @@ class ViewController: UIViewController {
*/
searchBarView
.
statusBarStyle
=
.
Default
searchBarView
.
delegate
=
self
searchBarView
.
placeholder
=
"Search"
searchBarView
.
tintColor
=
MaterialColor
.
blueGrey
.
darken4
searchBarView
.
textColor
=
MaterialColor
.
blueGrey
.
darken4
searchBarView
.
placeholderTextColor
=
MaterialColor
.
blueGrey
.
darken4
searchBarView
.
textField
.
font
=
RobotoFont
.
regular
WithSize
(
20
)
searchBarView
.
textField
.
font
=
RobotoFont
.
regular
searchBarView
.
clearButton
=
clearButton
searchBarView
.
leftControls
=
[
backButton
]
...
...
@@ -105,12 +104,3 @@ class ViewController: UIViewController {
view
.
addSubview
(
searchBarView
)
}
}
/// SearchBarViewDelegate methods.
extension
ViewController
:
SearchBarViewDelegate
{
func
searchBarViewDidChangeLayout
(
searchBarView
:
SearchBarView
)
{
print
(
"Updated Frame:
\(
searchBarView
.
frame
)
"
)
}
}
Examples/Programmatic/SearchBarViewController/SearchBarViewController/AppSearchBarViewController.swift
View file @
e097bb28
...
...
@@ -117,7 +117,7 @@ class AppSearchBarViewController: SearchBarViewController {
searchBarView
.
tintColor
=
MaterialColor
.
blueGrey
.
darken4
searchBarView
.
textColor
=
MaterialColor
.
blueGrey
.
darken4
searchBarView
.
placeholderTextColor
=
MaterialColor
.
blueGrey
.
darken4
searchBarView
.
textField
.
font
=
RobotoFont
.
regular
WithSize
(
20
)
searchBarView
.
textField
.
font
=
RobotoFont
.
regular
searchBarView
.
textField
.
delegate
=
self
searchBarView
.
clearButton
=
clearButton
...
...
Examples/Storyboards/NavigationBarView/NavigationBarView/ViewController.swift
View file @
e097bb28
...
...
@@ -35,12 +35,16 @@ class ViewController: UIViewController {
@IBOutlet
weak
var
navigationBarView
:
NavigationBarView
!
/// ************* This needs to be attached to the Storyboard. *************
@IBOutlet
weak
var
navigationBarViewHeightConstraint
:
NSLayoutConstraint
?
override
func
willRotateToInterfaceOrientation
(
toInterfaceOrientation
:
UIInterfaceOrientation
,
duration
:
NSTimeInterval
)
{
//
if landscape
//
If landscape.
if
UIInterfaceOrientationIsLandscape
(
toInterfaceOrientation
)
{
/**
The height of the NavigationBarView is dependant on the device being used.
If the device is an iPad, the height should stay the same as in Portrait
view, otherwise it should strink to the Landscape height for iPhone.
*/
navigationBarViewHeightConstraint
?
.
constant
=
.
iPad
==
MaterialDevice
.
type
?
navigationBarView
!.
heightForPortraitOrientation
:
navigationBarView
!.
heightForLandscapeOrientation
}
else
{
navigationBarViewHeightConstraint
?
.
constant
=
navigationBarView
!.
heightForPortraitOrientation
...
...
Sources/NavigationBarView.swift
View file @
e097bb28
...
...
@@ -30,11 +30,6 @@
import
UIKit
@objc(NavigationBarView)
public
protocol
NavigationBarViewDelegate
:
MaterialDelegate
{
optional
func
navigationBarViewDidChangeLayout
(
navigationBarView
:
NavigationBarView
)
}
public
class
NavigationBarView
:
StatusBarView
{
/// Title label.
public
var
titleLabel
:
UILabel
?
{
...
...
@@ -88,7 +83,7 @@ public class NavigationBarView : StatusBarView {
contentView
.
grid
.
contentInset
.
top
=
-
8
}
else
{
v
.
grid
.
rows
=
1
v
.
font
=
v
.
font
.
fontWithSize
(
20
)
v
.
font
=
v
.
font
?
.
fontWithSize
(
20
)
contentView
.
grid
.
axis
.
rows
=
1
contentView
.
grid
.
spacing
=
0
contentView
.
grid
.
contentInset
.
top
=
0
...
...
Sources/SearchBarView.swift
View file @
e097bb28
...
...
@@ -30,11 +30,6 @@
import
UIKit
@objc(SearchBarViewDelegate)
public
protocol
SearchBarViewDelegate
:
MaterialDelegate
{
optional
func
searchBarViewDidChangeLayout
(
searchBarView
:
SearchBarView
)
}
public
class
SearchBarView
:
StatusBarView
{
/// The UITextField for the searchBar.
public
private(set)
lazy
var
textField
:
TextField
=
TextField
()
...
...
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