teacup + sugarcube = sweettea
Handlers for teacup that add the coercion abilities of sugarcube to the style abilities of teacup, for great good.
# what was
my_image = UIImage.imageNamed("Logo")
style :label,
font: UIFont.fontWithName("Inconsolata", size:UIFont.systemFontSize),
image: my_image,
origin: [10, 10],
size: my_image.size
# sugarcube
my_image = "Logo".uiimage
style :label,
font: "Inconsolata".uifont,
image: my_image,
origin: [10, 10],
size: my_image.size
# sweettea
style :label,
font: "Inconsolata",
image: "Logo",
origin: [10, 10]
# size is set automatically, isn't that nice?
# (it will not be set if frame.size is already set to something other than [0, 0])
gem install sugarcube
gem install teacup
gem install sweettea
# or in Gemfile
gem 'sugarcube'
gem 'teacup'
gem 'sweettea'
# in Rakefile
require 'sugarcube'
require 'teacup'
require 'sweettea'