Added to readme for new animate feature and added a test

This commit is contained in:
Todd Werth
2014-05-04 23:27:04 -07:00
parent cf1ab9cf40
commit f7d5308b5c
2 changed files with 18 additions and 0 deletions

View File

@@ -636,6 +636,16 @@ rmq(my_text_field).focus # or .become_first_responder
----
The most basic:
```ruby
rmq.animate do |q|
rmq(UIButton).nudge r: 40
end
```
Some more options, this time it is animating a selectec view:
```ruby
rmq(my_view).animate(
duration: 0.3,
@@ -672,6 +682,8 @@ rmq(selectors).animate(
----
See animate above.
#### Current animations included:
```ruby

View File

@@ -28,6 +28,12 @@ describe 'animations' do
})
end
it 'should animate given only a block' do
@vc.rmq.animate do |q|
RubyMotionQuery::RMQ.is_blank?(rmq).should == false
end
end
it 'should allow options from animateWithDuration in animate' do
@vc.rmq.animate(
duration: 0.0,