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
a3638453
Commit
a3638453
authored
Aug 31, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: updated button to handle background at better operation time
parent
d24172ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
Source/MaterialButton.swift
+1
-3
No files found.
Source/MaterialButton.swift
View file @
a3638453
...
@@ -100,6 +100,7 @@ public class MaterialButton : UIButton {
...
@@ -100,6 +100,7 @@ public class MaterialButton : UIButton {
*/
*/
final
public
override
func
drawRect
(
rect
:
CGRect
)
{
final
public
override
func
drawRect
(
rect
:
CGRect
)
{
prepareContext
(
rect
)
prepareContext
(
rect
)
prepareBackgroundColorView
()
prepareButton
()
prepareButton
()
}
}
...
@@ -108,7 +109,6 @@ public class MaterialButton : UIButton {
...
@@ -108,7 +109,6 @@ public class MaterialButton : UIButton {
//
//
internal
func
prepareView
()
{
internal
func
prepareView
()
{
setTranslatesAutoresizingMaskIntoConstraints
(
false
)
setTranslatesAutoresizingMaskIntoConstraints
(
false
)
prepareBackgroundColorView
()
}
}
//
//
...
@@ -166,8 +166,6 @@ public class MaterialButton : UIButton {
...
@@ -166,8 +166,6 @@ public class MaterialButton : UIButton {
//
//
// :name: prepareBackgroundColorView
// :name: prepareBackgroundColorView
//
//
// We need this view so we can use the masksToBounds
// so the pulse doesn't animate off the button
private
func
prepareBackgroundColorView
()
{
private
func
prepareBackgroundColorView
()
{
backgroundColorView
.
setTranslatesAutoresizingMaskIntoConstraints
(
false
)
backgroundColorView
.
setTranslatesAutoresizingMaskIntoConstraints
(
false
)
backgroundColorView
.
layer
.
masksToBounds
=
true
backgroundColorView
.
layer
.
masksToBounds
=
true
...
...
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