Skip to content

Instantly share code, notes, and snippets.

@compressed
Created June 17, 2012 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save compressed/2945200 to your computer and use it in GitHub Desktop.
Save compressed/2945200 to your computer and use it in GitHub Desktop.
# iphone.rb
Teacup::Stylesheet.new :iphone do
style :root,
backgroundColor: UIColor.redColor,
rowHeight: 100
end
# mycontroller.rb
class MyController < UITableViewController
attr_accessor :stylesheet
def layoutDidLoad
layout self.tableView, :root do
p '1'
end
end
def viewDidLoad
super
# stylesheet :iphone
@stylesheet = :iphone
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment