Created
July 8, 2014 19:20
-
-
Save sxross/7a4ddaa1fcf92a74f414 to your computer and use it in GitHub Desktop.
RMQ Distribute
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
# stylesheet | |
def remember_me_label(st) | |
st.frame = {bp: PADDING, l:MARGIN, h:HEIGHT, w: WIDTH / 2} | |
st.text = 'remember me' | |
end | |
def remember_me_switch(st) | |
st.frame = {rop: 10, h:HEIGHT, w:WIDTH / 2} # bp: -32, | |
end | |
def distribute_remember_me | |
rmq(:remember_me_label, :remember_me_switch).distribute :horizontal, margin: 5 | |
end | |
# controller viewDidLoad | |
rmq.append(UILabel, :remember_me_label) | |
q = rmq.append(UISwitch, :remember_me_switch).on(:change){|sender| | |
# blah, blah, blah | |
} | |
rmq.stylesheet.distribute_remember_me |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment