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-1.3.3 app/custom_class.rb
teacup-1.3.2 app/custom_class.rb
teacup-1.3.1 app/custom_class.rb
teacup-1.3.0 app/custom_class.rb
teacup-1.2.9 app/custom_class.rb
teacup-1.2.8 app/custom_class.rb
teacup-1.2.7 app/custom_class.rb
teacup-1.2.5 app/custom_class.rb
teacup-1.2.4 app/custom_class.rb
teacup-1.2.3 app/custom_class.rb
teacup-1.2.2 app/custom_class.rb