Skip to content

Instantly share code, notes, and snippets.

@jamonholmgren
Created May 16, 2013 00:23
Show Gist options
  • Save jamonholmgren/5588519 to your computer and use it in GitHub Desktop.
Save jamonholmgren/5588519 to your computer and use it in GitHub Desktop.
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
@puelocesar
Copy link

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