Skip to content

Conversation

@bartoszj
Copy link
Contributor

This command slows down animations. Works like 'Toggle Slow Animations' from iOS Simulator but this command works also on the device and user is able to select animation speed.

@kastiglione
Copy link
Contributor

Thank you @bartoszj 👍

Would you mind signing Facebook's Contributor License Agreement? If you have any questions I'd be happy to help answer. https://code.facebook.com/cla

@bartoszj
Copy link
Contributor Author

bartoszj commented Jan 5, 2015

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about calling this slowanim?

@kastiglione
Copy link
Contributor

@bartoszj Thanks for submitting this! I have a couple comments above.

What do you think about adding two commands, one to turn this on, one to turn if off. All of our other commands work this way, so we should be consistent unless there's a good reason not to be. If we have two commands, they can both have a default speed, with the undo command having a speed of 1.

@arigrant
Copy link
Contributor

Isn't this the same as 'slowanim' and 'unslowanim' or have we not merged that, @kastiglione ?

@bartoszj
Copy link
Contributor Author

@kastiglione I agree with two commands. slowanim and unslowanim would be OK? Also I'll check slow animation on all windows.

@kastiglione
Copy link
Contributor

Great! 🙇

* commit 'abcbb93abe22d98b273c981c71c96ece80286af6':
  Reverting some of the code review changes
  Code cleanup
  Review corrections
  Added print accessibility tree command. Find accessibility element command reworked
  Add basic Swift support (requires Xcode 6)
@bartoszj
Copy link
Contributor Author

Updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

For what it's worth, another way that might have worked is to use NSArray's custom implementation of -setValue:forKey::

[[[UIApplication sharedApplication] windows] setValue:@(speed) forKey:@"speed"]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where allowable, can we change the XYClass * casts to simply id?

@kastiglione
Copy link
Contributor

Thanks @bartoszj! I left a couple comments, the main one is about giving slowanim a default speed value so that it could be typed without having to provide an explicit speed.

@bartoszj
Copy link
Contributor Author

I've found that iOS Simulator is using 0.1 as speed value and I've set it in theslowanim command.

@kastiglione
Copy link
Contributor

💥

Looks good. I'll checkout this branch and give it a try and merge if all goes well. Thanks!

kastiglione added a commit that referenced this pull request Mar 14, 2015
@kastiglione kastiglione merged commit c5e5733 into facebook:master Mar 14, 2015
@kastiglione
Copy link
Contributor

Thanks for this contribution! And thanks for being patient and awesome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants