|
|
|
|
|
by jballanc
5154 days ago
|
|
In RubyMotion, you can do something like: def animate(*args)
UIView.begin_animation
yield(*args)
UIView.commit_animation
end
animate(myButton, &buttonAnimateBlockFromSomewhereElse)
animate(myView, myOtherView, &genericAnimateBlockFromSomewhereElseWithTwoArgs)
animate do
# Do something locally ignoring args
end
And, yes, you can do the same thing with Obj-C and some creative casts...but it's nicer in RubyMotion! (ymmv) |
|