mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-01-12 17:52:17 +08:00
Added to readme for new animate feature and added a test
This commit is contained in:
12
README.md
12
README.md
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user