Rework the gestural interactions to use constant properties where applicable.

Authored by featherless on Mar 1 2017, 2:14 PM.



Draggable/Rotatable/Scalable all share the same base type now.

The default behavior of these interactions is now to register a new gesture recognizer to the target view.

Diff Detail

rREACTIVEMOTIONSWIFT reactive-motion-swift
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
featherless created this revision.Mar 1 2017, 2:14 PM
Restricted Application completed building Restricted Buildable.Mar 1 2017, 2:14 PM
featherless edited the summary of this revision. (Show Details)Mar 1 2017, 2:14 PM
chuga requested changes to this revision.Mar 1 2017, 4:58 PM
chuga added a subscriber: chuga.
chuga added inline comments.
25 ↗(On Diff #10132)

this needs documentation

35 ↗(On Diff #10132)

I find the use of "next" here a little confusing as it implies that there's an order or sequence of them, but I don't have a better suggestion atm :(

58 ↗(On Diff #10132)

Naming here could be improved, gestureRecognizer(targetView reactiveView: ReactiveUIView) would be a better alternative imo.
Also, should the reactiveView be optional? why would it be mandatory for the other configs? or those shouldn't be calling prepareToAdd?


nit: what about using default values for these as nil and have a single init?

This revision now requires changes to proceed.Mar 1 2017, 4:58 PM
featherless marked 3 inline comments as done.Mar 2 2017, 12:29 PM
featherless added inline comments.
35 ↗(On Diff #10132)

I've made it a property to better indicate that it's a cached value.

58 ↗(On Diff #10132)

Renamed to follow more of a queue metaphor.

featherless marked 2 inline comments as done.
  • Add docs.
  • Make a property.
  • Queue.
featherless marked an inline comment as done.Mar 2 2017, 12:30 PM
featherless added inline comments.

This gets reworked in a follow-up diff.

chuga accepted this revision.Mar 2 2017, 1:11 PM
This revision is now accepted and ready to land.Mar 2 2017, 1:11 PM
This revision was automatically updated to reflect the committed changes.
featherless marked an inline comment as done.