This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Gesture
Atsuya Sato edited this page Nov 30, 2018
·
6 revisions
- fingerPressed
- touchX
- touchY
- touches
- mousePressed
- mouseX
- mouseY
- func didTap()
- func didRelease()
- func didDrag()
- func didSwipe()
- func didPinch()
- func didRotate()
- func didLongPress()
- func didClick()
- func didRelease()
- func didDrag()
- func didMove()
- func didMagnify()
- func didRotate()
- func didPress()
- func didScroll()
iOS
func draw() {
if fingerPressed {
ellipse(touchX, touchY, 10, 10)
}
}
iOS
func draw() {
if fingerPressed {
ellipse(touchX, touchY, 10, 10)
}
}
iOS
func draw() {
if fingerPressed {
ellipse(touchX, touchY, 10, 10)
}
}
iOS
func draw() {
if fingerPressed {
for touch in touches {
ellipse(touch.x, touch.y, 10, 10)
}
}
}
OSX
func draw() {
if mousePressed {
ellipse(mouseX, mouseY, 10, 10)
}
}
OSX
func draw() {
if mousePressed {
ellipse(mouseX, mouseY, 10, 10)
}
}
OSX
func draw() {
if mousePressed {
ellipse(mouseX, mouseY, 10, 10)
}
}
iOS
func didTap() {
// Called when tapped
}
iOS
func didTap() {
// Called when release
}
iOS
func didDrag() {
// Called when dragged
}
iOS
func didSwipe(direction: UISwipeGestureRecognizer.Direction) {
// Called when swiped
}
iOS
func didPinch(scale: CGFloat, velocity: CGFloat) {
// Called when pinched
}
iOS
func didRotate(rotation: CGFloat, velocity: CGFloat) {
// Called when pinched
}
iOS
func didLongPress() {
// Called when long pressed
}
OSX
func didClick() {
// Called when clicked
}
OSX
func didRelease() {
// Called when released
}
OSX
func didDrag() {
// Called when dragged
}
OSX
func didMove() {
// Called when moved
}
OSX
func didMagnify(magnification: CGFloat) {
// Called when magnified
}
OSX
func didRotate(rotation: CGFloat, inDegrees: CGFloat) {
// Called when rotated
}
OSX
func didPress() {
// Called when pressed
}
OSX
func didScroll(x: CGFloat, y: CGFloat) {
// Called when scrolled
}