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
0ae0cd7b
Unverified
Commit
0ae0cd7b
authored
Sep 21, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: updated Button example project
parent
d04c07e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletions
+25
-1
Examples/Programmatic/Button/Button/ViewController.swift
+25
-1
No files found.
Examples/Programmatic/Button/Button/ViewController.swift
View file @
0ae0cd7b
...
...
@@ -37,11 +37,35 @@ class ViewController: UIViewController {
view
.
backgroundColor
=
Color
.
white
prepareFlatButton
()
prepareRaisedButton
()
prepareFabButton
()
prepareIconButton
()
}
private
func
prepareFlatButton
()
{
let
button
=
FlatButton
(
title
:
"Flat Button"
,
titleColor
:
Color
.
blue
.
base
)
view
.
layout
(
button
)
.
width
(
120
)
.
height
(
36
)
.
center
()
view
.
layout
(
button
)
.
width
(
120
)
.
height
(
40
)
.
center
(
offsetY
:
-
150
)
}
private
func
prepareRaisedButton
()
{
let
button
=
RaisedButton
(
title
:
"Raised Button"
,
titleColor
:
Color
.
white
)
button
.
pulseColor
=
Color
.
white
button
.
backgroundColor
=
Color
.
blue
.
base
view
.
layout
(
button
)
.
width
(
150
)
.
height
(
40
)
.
center
(
offsetY
:
-
75
)
}
private
func
prepareFabButton
()
{
let
button
=
FabButton
(
image
:
Icon
.
cm
.
add
,
tintColor
:
Color
.
white
)
view
.
layout
(
button
)
.
width
(
48
)
.
height
(
48
)
.
center
()
}
private
func
prepareIconButton
()
{
let
button
=
IconButton
(
image
:
Icon
.
cm
.
search
,
tintColor
:
Color
.
blue
.
base
)
view
.
layout
(
button
)
.
width
(
120
)
.
height
(
40
)
.
center
(
offsetY
:
75
)
}
}
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