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
fa84e1bf
Commit
fa84e1bf
authored
Aug 23, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated
parent
5580bc33
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
21 deletions
+28
-21
Source/FabButton.swift
+13
-12
Source/FlatButton.swift
+7
-4
Source/RaisedButton.swift
+8
-5
No files found.
Source/FabButton.swift
View file @
fa84e1bf
...
@@ -108,22 +108,23 @@ public class FabButton : UIButton {
...
@@ -108,22 +108,23 @@ public class FabButton : UIButton {
layer
.
shadowRadius
=
5
layer
.
shadowRadius
=
5
}
}
override
public
func
touchesBegan
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
public
override
func
touchesBegan
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
super
.
touchesBegan
(
touches
,
withEvent
:
event
)
super
.
touchesBegan
(
touches
,
withEvent
:
event
)
pulseTouches
(
touches
)
pulseTouches
(
touches
)
}
}
override
public
func
touchesEnded
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
public
override
func
touchesEnded
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
super
.
touchesEnded
(
touches
,
withEvent
:
event
)
super
.
touchesEnded
(
touches
,
withEvent
:
event
)
shrink
()
shrink
()
removePulse
()
removePulse
()
}
}
public
override
func
touchesCancelled
(
touches
:
Set
<
NSObject
>!
,
withEvent
event
:
UIEvent
!
)
{
public
override
func
touchesCancelled
(
touches
:
Set
<
NSObject
>!
,
withEvent
event
:
UIEvent
!
)
{
shrink
()
super
.
touchesCancelled
(
touches
,
withEvent
:
event
)
removePulse
()
shrink
()
}
removePulse
()
}
func
pulseTouches
(
touches
:
NSSet
)
{
func
pulseTouches
(
touches
:
NSSet
)
{
let
touch
=
touches
.
allObjects
.
last
as!
UITouch
let
touch
=
touches
.
allObjects
.
last
as!
UITouch
let
touchLocation
=
touch
.
locationInView
(
self
)
let
touchLocation
=
touch
.
locationInView
(
self
)
...
...
Source/FlatButton.swift
View file @
fa84e1bf
...
@@ -77,16 +77,19 @@ public class FlatButton : UIButton {
...
@@ -77,16 +77,19 @@ public class FlatButton : UIButton {
}
}
public
override
func
touchesBegan
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
public
override
func
touchesBegan
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
pulseTouches
(
touches
)
super
.
touchesBegan
(
touches
,
withEvent
:
event
)
pulseTouches
(
touches
)
}
}
public
override
func
touchesEnded
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
public
override
func
touchesEnded
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
shrink
()
super
.
touchesEnded
(
touches
,
withEvent
:
event
)
removePulse
()
shrink
()
removePulse
()
}
}
public
override
func
touchesCancelled
(
touches
:
Set
<
NSObject
>!
,
withEvent
event
:
UIEvent
!
)
{
public
override
func
touchesCancelled
(
touches
:
Set
<
NSObject
>!
,
withEvent
event
:
UIEvent
!
)
{
shrink
()
super
.
touchesCancelled
(
touches
,
withEvent
:
event
)
shrink
()
removePulse
()
removePulse
()
}
}
...
...
Source/RaisedButton.swift
View file @
fa84e1bf
...
@@ -78,18 +78,21 @@ public class RaisedButton : UIButton {
...
@@ -78,18 +78,21 @@ public class RaisedButton : UIButton {
}
}
public
override
func
touchesBegan
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
public
override
func
touchesBegan
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
super
.
touchesBegan
(
touches
,
withEvent
:
event
)
pulseTouches
(
touches
)
pulseTouches
(
touches
)
}
}
public
override
func
touchesEnded
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
public
override
func
touchesEnded
(
touches
:
Set
<
NSObject
>
,
withEvent
event
:
UIEvent
)
{
super
.
touchesEnded
(
touches
,
withEvent
:
event
)
shrink
()
removePulse
()
}
public
override
func
touchesCancelled
(
touches
:
Set
<
NSObject
>!
,
withEvent
event
:
UIEvent
!
)
{
super
.
touchesCancelled
(
touches
,
withEvent
:
event
)
shrink
()
shrink
()
removePulse
()
removePulse
()
}
}
public
override
func
touchesCancelled
(
touches
:
Set
<
NSObject
>!
,
withEvent
event
:
UIEvent
!
)
{
shrink
()
removePulse
()
}
func
pulseTouches
(
touches
:
NSSet
)
{
func
pulseTouches
(
touches
:
NSSet
)
{
let
touch
=
touches
.
allObjects
.
last
as!
UITouch
let
touch
=
touches
.
allObjects
.
last
as!
UITouch
...
...
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