Giter Club home page Giter Club logo

Comments (6)

jverkoey avatar jverkoey commented on August 31, 2024

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.

pingpongboss avatar pingpongboss commented on August 31, 2024

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.

jverkoey avatar jverkoey commented on August 31, 2024

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.

rcameron avatar rcameron commented on August 31, 2024

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.

jverkoey avatar jverkoey commented on August 31, 2024

Could the application of swift generics here aid in any way?

from direct-manipulation-swift.

rcameron avatar rcameron commented on August 31, 2024

🎊 My diff is ready for review at http://codereview.cc/D1620

from direct-manipulation-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.