Created
May 26, 2015 15:03
-
-
Save zhulinpinyu/6b14b3c4a6e4201954af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmq.append(UILabel, :hello_label) | |
rmq.append(UIButton, :hello_button).on(:tap) do |sender| | |
rmq(:hello_label).animate( | |
duration: 1, | |
animations: -> (q) { | |
q.style do |st| | |
st.scale = 0.6 | |
st.view.alpha = 0.1 | |
st.top = st.top - 50 | |
end | |
}, | |
completion: -> (did_finish, q) { | |
q.animate( | |
duration: 0.3, | |
animations: -> (cq) { | |
cq.style do |st| | |
st.scale = 1 | |
st.view.alpha = 1 | |
st.top = st.top + 50 | |
st.text = (st.text == "Hello RMQ!" ? "Goodbye RMQ!" : "Hello RMQ!") | |
end | |
} | |
) | |
} | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment