Comments (6)
Considered this more while writing the spec for Direct Manipulation; the plan's gesture recognizer property can be optional.
If no gesture recognizer is provided, then the performer can create one and add it to the target.
If a gesture recognizer is provided, then we may only want to add the gesture recognizer to the target if it doesn't already have a view.
from direct-manipulation-swift.
Just want to note that it seems strange to me that the GestureRecognizer is managed by the client and provided to the Draggable Plan.
Seems to me like you'd want to abstract away the GestureRecognizer by having it be privately owned by the Performer.
from direct-manipulation-swift.
If a gesture recognizer already exists then the client needs a way to pass it into the system. For example, iOS provides an edge swipe gesture recognizer on all view controllers.
from direct-manipulation-swift.
I was also of the mind that it should be abstracted away, but making it optional seems like the right approach considering the example you provided.
I attempted to turn Gesturable into a protocol requiring a gesture recognizer. I was thinking customized classes such as Draggable could then vend a panGestureRecognizer, which would be a computed property that casts the protocol-required gesture recognizer. I believe this is similar to how the tableView and collectionView properties work on UITVC and UICVC.
from direct-manipulation-swift.
Could the application of swift generics here aid in any way?
from direct-manipulation-swift.
🎊 My diff is ready for review at http://codereview.cc/D1620
from direct-manipulation-swift.
Related Issues (20)
- Implement anchor point manipulation HOT 1
- Increase unit test coverage to 100% HOT 1
- Objective-C usage HOT 2
- Adding and removing touches doesn't appear to adjust the anchor point
- Add CatalogByConvention dependency HOT 1
- Move performer logic to private/ dir HOT 3
- Introduce an instantly-reactive gesture recognizer for pan/pinch/rotate HOT 1
- Write instantly-reactive gesture recognizer documentation/examples
- isUserInteractionEnabled must be enabled on views for gesture recognizers to send events HOT 1
- DirectlyManipulable should not expose plans in its public API HOT 1
- Add example demonstrating how to use a pre-existing gesture recognizer
- Add example demonstrating how to use ChangeAnchorPoint
- Performers must acquire a token when the gesture recognizers are active HOT 2
- Consolidate all gesture recognizer performers into one performer HOT 1
- Pinchable/Rotatable/Draggable should not emit anchor point adjustment HOT 1
- Replace all uses of Scheduler with Runtime HOT 1
- Pull testable gesture recognizers out to their own lib HOT 1
- Gesture recognizers should be settable after plan initialization HOT 1
- Replace ChangeAnchorPoint with a function and introduce AdjustsAnchorPoint HOT 1
- Scale delta isn't being applied correctly to the target's scale HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from direct-manipulation-swift.