Created
May 16, 2013 00:23
-
-
Save jamonholmgren/5588519 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
Teacup::Stylesheet.new :main do | |
style :my_style, | |
constraints: [ | |
constrain_left(0), | |
constrain_width(100), | |
constrain_top(0), | |
constrain(:bottom).equals(:superview, :bottom), | |
] | |
end | |
class HomeScreen < PM::Screen | |
stylesheet :main | |
def will_appear | |
add UIView, :my_style | |
end | |
end |
That doesn't work here, any ideas?
I get:
2013-10-08 17:07:41.156 LumieVideo[41938:a0b] +[UIView superview]: unrecognized selector sent to class 0x17207e0
(main)> 2013-10-08 17:07:42.872 LumieVideo[41938:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIView superview]: unrecognized selector sent to class 0x17207e0'
*** First throw call stack:
Nevermind, I just had to call this way:
add UIView, { stylename: :background }
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, sure is.