This document discusses gestures in iOS development. It explains how to add gesture recognizers to UIViews to detect gestures, how to implement gesture handler methods, and some key properties and methods related to gesture recognition like state and translation. It provides an example handler method for a UIPanGestureRecognizer that detects the translation of pan gestures and resets the translation between detections.
After you’ve done all the UI optimizations recommended by UX designers, how do you make your interface even more engaging? That’s where the Samsung Mobile SDK can help. Part 1 of Advancing Your UI introduces you to three new technologies -- Look, Motion, and Gesture – that allow you to create an interface that engages your audience in ways you have not yet explored.
3D Touch: Preparando sua app para o futuro do iOSRodrigo Borges
Nessa palestra vamos falar sobre o 3D Touch e como ele será uma das bases de interação dos usuários na próxima versão do iOS. Mostrarei como integrar sua app com recursos do 3D Touch como o Peek & Pop e discutiremos sobre as novidades lançadas na WWDC 2016.
In this talk, I'm presenting an alternative approach to thinking about UI and navigation on iOS - one that is declarative and that I find easy to reason about in a big application. I did live coding and the link is on the last slide. Enjoy!
After you’ve done all the UI optimizations recommended by UX designers, how do you make your interface even more engaging? That’s where the Samsung Mobile SDK can help. Part 1 of Advancing Your UI introduces you to three new technologies -- Look, Motion, and Gesture – that allow you to create an interface that engages your audience in ways you have not yet explored.
3D Touch: Preparando sua app para o futuro do iOSRodrigo Borges
Nessa palestra vamos falar sobre o 3D Touch e como ele será uma das bases de interação dos usuários na próxima versão do iOS. Mostrarei como integrar sua app com recursos do 3D Touch como o Peek & Pop e discutiremos sobre as novidades lançadas na WWDC 2016.
In this talk, I'm presenting an alternative approach to thinking about UI and navigation on iOS - one that is declarative and that I find easy to reason about in a big application. I did live coding and the link is on the last slide. Enjoy!
Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...Codemotion
In a world where Imperative Programming is the most used paradigm, Reactive comes up to make our code more reusable, robust, and stateless. Learn what Functional Reactive Programming means and how it could help you with problems you have to face daily in your projects. We’ll present basic concepts and practical examples for iOS developers that will help you to start thinking in streams, observers, .. and mix them with cool Swift functional concepts.
With the introduction of the iPhone 6s and the iPhone 6s Plus, Apple added 3D Touch, a new dimension to the multi-touch user interface. This new technology senses how deeply users press the display and provides a new way to interact with the iPhone.
In iOS 9, Apple introduced several 3D Touch APIs. In this session I will explain in a practical way what is 3D Touch and how you can benefit from it in your app. I will cover home screen quick actions, peek and pop actions and also how to use the force properties of a UITouch event.
I recognized from iOS app developers transition animations in the app developers Apple lets in web designers Kit APIs to use app development custom animations of their operating app developers system.
Presented at YOW! Connected 2015 (Melbourne) by Jeames Bone & Mark Corbyn:
"There are many great resources for getting started with Functional Reactive Programming and ReactiveCocoa, but what’s the next step? ReactiveCocoa is not just a nice wrapper for KVO, Signals can be used to model many common problems in Cocoa including managing the state of your UI, notifications and even business logic. Adopting ReactiveCocoa can make for more modular, self-documenting code — while still integrating easily with other APIs and your existing code. We would like to share with you some interesting, practical examples where we’ve used ReactiveCocoa to solve problems in our app. Our goal is to inspire you to consider how ReactiveCocoa can be applied in your own apps."
Improving android experience for both users and developersPavel Lahoda
Android UI and User Experience has changed dramatically in the recent version(s) and while users generally enjoy the new features, there are still several areas that are left to application-level-DIY-patterns. For developers, this is double challenge, they want to provide users with the bleeding edge UI patterns and at the same time, they have to deal with evolving API, that sometimes changes dramatically.
Presentation covers the gotchas developer might face dealing with ever-moving Android API, and how to utilize Java language and the tools it have to make the experience for developer more pleasant. Typical trends in the API will get analyzed and divided into several areas or "patterns", discussing typical scenarios how these components are designed and implemented.
This talk will propose several such UI patterns, that will compete to become "de facto" standards and details on the implementation, including possible impact on existing API as we have both end users and developers in mind.
The list of patterns/areas discussed in the talk include following :
ActionBar
ListView
TimePicker
KineticGestureComponent
Conductor is a lightweight alternative to Fragments that enables developers to build single activity apps in an easy way. In this talk I give an introduction to the library and some complex scenarios.
Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...Codemotion
In a world where Imperative Programming is the most used paradigm, Reactive comes up to make our code more reusable, robust, and stateless. Learn what Functional Reactive Programming means and how it could help you with problems you have to face daily in your projects. We’ll present basic concepts and practical examples for iOS developers that will help you to start thinking in streams, observers, .. and mix them with cool Swift functional concepts.
With the introduction of the iPhone 6s and the iPhone 6s Plus, Apple added 3D Touch, a new dimension to the multi-touch user interface. This new technology senses how deeply users press the display and provides a new way to interact with the iPhone.
In iOS 9, Apple introduced several 3D Touch APIs. In this session I will explain in a practical way what is 3D Touch and how you can benefit from it in your app. I will cover home screen quick actions, peek and pop actions and also how to use the force properties of a UITouch event.
I recognized from iOS app developers transition animations in the app developers Apple lets in web designers Kit APIs to use app development custom animations of their operating app developers system.
Presented at YOW! Connected 2015 (Melbourne) by Jeames Bone & Mark Corbyn:
"There are many great resources for getting started with Functional Reactive Programming and ReactiveCocoa, but what’s the next step? ReactiveCocoa is not just a nice wrapper for KVO, Signals can be used to model many common problems in Cocoa including managing the state of your UI, notifications and even business logic. Adopting ReactiveCocoa can make for more modular, self-documenting code — while still integrating easily with other APIs and your existing code. We would like to share with you some interesting, practical examples where we’ve used ReactiveCocoa to solve problems in our app. Our goal is to inspire you to consider how ReactiveCocoa can be applied in your own apps."
Improving android experience for both users and developersPavel Lahoda
Android UI and User Experience has changed dramatically in the recent version(s) and while users generally enjoy the new features, there are still several areas that are left to application-level-DIY-patterns. For developers, this is double challenge, they want to provide users with the bleeding edge UI patterns and at the same time, they have to deal with evolving API, that sometimes changes dramatically.
Presentation covers the gotchas developer might face dealing with ever-moving Android API, and how to utilize Java language and the tools it have to make the experience for developer more pleasant. Typical trends in the API will get analyzed and divided into several areas or "patterns", discussing typical scenarios how these components are designed and implemented.
This talk will propose several such UI patterns, that will compete to become "de facto" standards and details on the implementation, including possible impact on existing API as we have both end users and developers in mind.
The list of patterns/areas discussed in the talk include following :
ActionBar
ListView
TimePicker
KineticGestureComponent
Conductor is a lightweight alternative to Fragments that enables developers to build single activity apps in an easy way. In this talk I give an introduction to the library and some complex scenarios.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
3. CS193p
Fall 2017-18
Demo
PlayingCard continued …
Now that we have our PlayingCard Model, time to implement our Controller and View
Creating a custom UIView subclass
Drawing with Core Graphics and UIBezierPath
UIView’s contentMode (i.e. redraw vs. scaling the bits on bounds change)
Drawing with transparency
More NSAttributedString dictionary keys … UIFont and NSParagraphStyle
UIFontMetrics scaling for users who want larger fonts
Managing subviews of your custom UIView
Using isHidden
CGAffineTransform
Constraint Priority
Assets.xcassets and drawing with UIImage
@IBDesignable and @IBInspectable
Using didSet to ensure redraws and relayouts when properties change
4. CS193p
Fall 2017-18
Gestures
We’ve seen how to draw in a UIView, how do we get touches?
We can get notified of the raw touch events (touch down, moved, up, etc.)
Or we can react to certain, predefined “gestures.” The latter is the way to go!
Gestures are recognized by instances of UIGestureRecognizer
The base class is “abstract.” We only actually use concrete subclasses to recognize.
There are two sides to using a gesture recognizer
1. Adding a gesture recognizer to a UIView (asking the UIView to “recognize” that gesture)
2. Providing a method to “handle” that gesture (not necessarily handled by the UIView)
Usually the first is done by a Controller
Though occasionally a UIView will do this itself if the gesture is integral to its existence
The second is provided either by the UIView or a Controller
Depending on the situation. We’ll see an example of both in our demo.
5. CS193p
Fall 2017-18
Adding a gesture recognizer to a UIView
Imagine we wanted a UIView in our Controller’s View to recognize a “pan” gesture.
@IBOutlet weak var pannableView: UIView {
didSet {
let panGestureRecognizer = UIPanGestureRecognizer(
target: self, action: #selector(ViewController.pan(recognizer:))
)
pannableView.addGestureRecognizer(panGestureRecognizer)
}
}
Gestures
We can configure it to do so in the property observer for the outlet to that UIView …
6. CS193p
Fall 2017-18
@IBOutlet weak var pannableView: UIView {
didSet {
let panGestureRecognizer = UIPanGestureRecognizer(
target: self, action: #selector(ViewController.pan(recognizer:))
)
pannableView.addGestureRecognizer(panGestureRecognizer)
}
}
Adding a gesture recognizer to a UIView
Imagine we wanted a UIView in our Controller’s View to recognize a “pan” gesture.
Gestures
The property observer’s didSet code gets called when iOS hooks up this outlet at runtime
We can configure it to do so in the property observer for the outlet to that UIView …
7. CS193p
Fall 2017-18
@IBOutlet weak var pannableView: UIView {
didSet {
let panGestureRecognizer = UIPanGestureRecognizer(
target: self, action: #selector(ViewController.pan(recognizer:))
)
pannableView.addGestureRecognizer(panGestureRecognizer)
}
}
Adding a gesture recognizer to a UIView
Imagine we wanted a UIView in our Controller’s View to recognize a “pan” gesture.
Gestures
The property observer’s didSet code gets called when iOS hooks up this outlet at runtime
Here we are creating an instance of a concrete subclass of UIGestureRecognizer (for pans)
We can configure it to do so in the property observer for the outlet to that UIView …
8. CS193p
Fall 2017-18
@IBOutlet weak var pannableView: UIView {
didSet {
let panGestureRecognizer = UIPanGestureRecognizer(
target: self, action: #selector(ViewController.pan(recognizer:))
)
pannableView.addGestureRecognizer(panGestureRecognizer)
}
}
Adding a gesture recognizer to a UIView
Imagine we wanted a UIView in our Controller’s View to recognize a “pan” gesture.
Gestures
The property observer’s didSet code gets called when iOS hooks up this outlet at runtime
Here we are creating an instance of a concrete subclass of UIGestureRecognizer (for pans)
The target gets notified when the gesture is recognized (here it’s the Controller itself)
We can configure it to do so in the property observer for the outlet to that UIView …
9. CS193p
Fall 2017-18
Adding a gesture recognizer to a UIView
Imagine we wanted a UIView in our Controller’s View to recognize a “pan” gesture.
@IBOutlet weak var pannableView: UIView {
didSet {
let panGestureRecognizer = UIPanGestureRecognizer(
target: self, action: #selector(ViewController.pan(recognizer:))
)
pannableView.addGestureRecognizer(panGestureRecognizer)
}
}
Gestures
The property observer’s didSet code gets called when iOS hooks up this outlet at runtime
Here we are creating an instance of a concrete subclass of UIGestureRecognizer (for pans)
The target gets notified when the gesture is recognized (here it’s the Controller itself)
The action is the method invoked on recognition (that method’s argument? the recognizer)
We can configure it to do so in the property observer for the outlet to that UIView …
10. CS193p
Fall 2017-18
Adding a gesture recognizer to a UIView
Imagine we wanted a UIView in our Controller’s View to recognize a “pan” gesture.
@IBOutlet weak var pannableView: UIView {
didSet {
let panGestureRecognizer = UIPanGestureRecognizer(
target: self, action: #selector(ViewController.pan(recognizer:))
)
pannableView.addGestureRecognizer(panGestureRecognizer)
}
}
Gestures
The property observer’s didSet code gets called when iOS hooks up this outlet at runtime
Here we are creating an instance of a concrete subclass of UIGestureRecognizer (for pans)
The target gets notified when the gesture is recognized (here it’s the Controller itself)
The action is the method invoked on recognition (that method’s argument? the recognizer)
Here we ask the UIView to actually start trying to recognize this gesture in its bounds
We can configure it to do so in the property observer for the outlet to that UIView …
11. CS193p
Fall 2017-18
@IBOutlet weak var pannableView: UIView {
didSet {
let panGestureRecognizer = UIPanGestureRecognizer(
target: self, action: #selector(ViewController.pan(recognizer:))
)
pannableView.addGestureRecognizer(panGestureRecognizer)
}
}
Adding a gesture recognizer to a UIView
Imagine we wanted a UIView in our Controller’s View to recognize a “pan” gesture.
@IBOutlet weak var pannableView: UIView {
didSet {
let panGestureRecognizer = UIPanGestureRecognizer(
target: self, action: #selector(ViewController.pan(recognizer:))
)
pannableView.addGestureRecognizer(panGestureRecognizer)
}
}
Gestures
The property observer’s didSet code gets called when iOS hooks up this outlet at runtime
Here we are creating an instance of a concrete subclass of UIGestureRecognizer (for pans)
The target gets notified when the gesture is recognized (here it’s the Controller itself)
The action is the method invoked on recognition (that method’s argument? the recognizer)
Here we ask the UIView to actually start trying to recognize this gesture in its bounds
Let’s talk about how we implement the handler …
We can configure it to do so in the property observer for the outlet to that UIView …
12. CS193p
Fall 2017-18
Gestures
A handler for a gesture needs gesture-specific information
So each concrete subclass provides special methods for handling that type of gesture
For example, UIPanGestureRecognizer provides 3 methods
func translation(in: UIView?) -> CGPoint // cumulative since start of recognition
func velocity(in: UIView?) -> CGPoint // how fast the finger is moving (points/s)
func setTranslation(CGPoint, in: UIView?)
This last one is interesting because it allows you to reset the translation so far
By resetting the translation to zero all the time, you end up getting “incremental” translation
The abstract superclass also provides state information
var state: UIGestureRecognizerState { get }
This sits around in .possible until recognition starts
For a continuous gesture (e.g. pan), it moves from .began thru repeated .changed to .ended
For a discrete (e.g. a swipe) gesture, it goes straight to .ended or .recognized.
It can go to .failed or .cancelled too, so watch out for those!
13. CS193p
Fall 2017-18
func pan(recognizer: UIPanGestureRecognizer) {
switch recognizer.state {
case .changed: fallthrough
case .ended:
let translation = recognizer.translation(in: pannableView)
// update anything that depends on the pan gesture using translation.x and .y
recognizer.setTranslation(CGPoint.zero, in: pannableView)
default: break
}
}
So, given this information, what would the pan handler look like?
Gestures
Remember that the action was pan(recognizer:)
14. CS193p
Fall 2017-18
func pan(recognizer: UIPanGestureRecognizer) {
switch recognizer.state {
case .changed: fallthrough
case .ended:
let translation = recognizer.translation(in: pannableView)
// update anything that depends on the pan gesture using translation.x and .y
recognizer.setTranslation(CGPoint.zero, in: pannableView)
default: break
}
}
So, given this information, what would the pan handler look like?
Gestures
Remember that the action was pan(recognizer:)
We are only going to do anything when the finger moves or lifts up off the device’s surface
15. CS193p
Fall 2017-18
func pan(recognizer: UIPanGestureRecognizer) {
switch recognizer.state {
case .changed: fallthrough
case .ended:
let translation = recognizer.translation(in: pannableView)
// update anything that depends on the pan gesture using translation.x and .y
recognizer.setTranslation(CGPoint.zero, in: pannableView)
default: break
}
}
So, given this information, what would the pan handler look like?
Gestures
Remember that the action was pan(recognizer:)
We are only going to do anything when the finger moves or lifts up off the device’s surface
fallthrough is “execute the code for the next case down” (case .changed,.ended: ok too)
16. CS193p
Fall 2017-18
func pan(recognizer: UIPanGestureRecognizer) {
switch recognizer.state {
case .changed: fallthrough
case .ended:
let translation = recognizer.translation(in: pannableView)
// update anything that depends on the pan gesture using translation.x and .y
recognizer.setTranslation(CGPoint.zero, in: pannableView)
default: break
}
}
So, given this information, what would the pan handler look like?
Gestures
Remember that the action was pan(recognizer:)
We are only going to do anything when the finger moves or lifts up off the device’s surface
fallthrough is “execute the code for the next case down” (case .changed,.ended: ok too)
Here we get the location of the pan in the pannableView’s coordinate system
17. CS193p
Fall 2017-18
func pan(recognizer: UIPanGestureRecognizer) {
switch recognizer.state {
case .changed: fallthrough
case .ended:
let translation = recognizer.translation(in: pannableView)
// update anything that depends on the pan gesture using translation.x and .y
recognizer.setTranslation(CGPoint.zero, in: pannableView)
default: break
}
}
So, given this information, what would the pan handler look like?
Gestures
Remember that the action was pan(recognizer:)
We are only going to do anything when the finger moves or lifts up off the device’s surface
fallthrough is “execute the code for the next case down” (case .changed,.ended: ok too)
Here we get the location of the pan in the pannableView’s coordinate system
Now we do whatever we want with that information
18. CS193p
Fall 2017-18
So, given this information, what would the pan handler look like?
func pan(recognizer: UIPanGestureRecognizer) {
switch recognizer.state {
case .changed: fallthrough
case .ended:
let translation = recognizer.translation(in: pannableView)
// update anything that depends on the pan gesture using translation.x and .y
recognizer.setTranslation(CGPoint.zero, in: pannableView)
default: break
}
}
Gestures
Remember that the action was pan(recognizer:)
We are only going to do anything when the finger moves or lifts up off the device’s surface
fallthrough is “execute the code for the next case down” (case .changed,.ended: ok too)
Here we get the location of the pan in the pannableView’s coordinate system
Now we do whatever we want with that information
By resetting the translation, the next one we get will be incremental movement
19. CS193p
Fall 2017-18
Gestures
UIPinchGestureRecognizer
var scale: CGFloat // not read-only (can reset)
var velocity: CGFloat { get } // scale factor per second
UIRotationGestureRecognizer
var rotation: CGFloat // not read-only (can reset); in radians
var velocity: CGFloat { get } // radians per second
UISwipeGestureRecognizer
Set up the direction and number of fingers you want
var direction: UISwipeGestureRecoginzerDirection // which swipe directions you want
var numberOfTouchesRequired: Int // finger count
20. CS193p
Fall 2017-18
Gestures
UITapGestureRecognizer
This is discrete, but you should check for .ended to actually do something.
Set up the number of taps and fingers you want …
var numberOfTapsRequired: Int // single tap, double tap, etc.
var numberOfTouchesRequired: Int // finger count
UILongPressRecognizer
This is a continuous (not discrete) gesture (i.e. you’ll get .changed if the finger moves)
You still configure it up-front …
var minimumPressDuration: TimeInterval // how long to hold before its recognized
var numberOfTouchesRequired: Int // finger count
var allowableMovement: CGFloat // how far finger can move and still recognize
Very important to pay attention to .cancelled because of drag and drop