Sha256: afb1ef49703b0a783a1893501a875875ae49b16d24c5163e9a0c8d64adf2bab1

Contents?: true

Size: 374 Bytes

Versions: 31

Compression:

Stored size: 374 Bytes

Contents

Teacup::Stylesheet.new :custom do
  style :container,
    frame: [[0, 0], [100, 20]]

  style :label,
    text: 'custom label',
    frame: [[0, 0], [100, 20]]
end

class CustomTeacupClass
  include Teacup::Layout

  def initialize
    self.stylesheet = :custom
  end

  def create_container
    layout(UIView, :container) do
      subview(UILabel, :label)
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
teacup-2.1.12 app/custom_class.rb
teacup-2.1.11 app/custom_class.rb
teacup-2.1.10 app/custom_class.rb
teacup-2.1.9 app/custom_class.rb
teacup-2.1.8 app/custom_class.rb
teacup-2.1.7 app/custom_class.rb
teacup-2.1.6 app/custom_class.rb
teacup-2.1.5 app/custom_class.rb
teacup-2.1.4 app/custom_class.rb
teacup-2.1.3 app/custom_class.rb
teacup-2.1.2 app/custom_class.rb
teacup-2.1.1 app/custom_class.rb
teacup-2.1.0 app/custom_class.rb
teacup-2.0.6 app/custom_class.rb
teacup-2.0.5 app/custom_class.rb
teacup-2.0.4 app/custom_class.rb
teacup-2.0.3 app/custom_class.rb
teacup-2.0.2 app/custom_class.rb
teacup-2.0.0 app/custom_class.rb
teacup-1.3.4 app/custom_class.rb