Sha256: 25ad271607525e33d3a8ec8bf031a58107ea2b2254cbf8f6179aabdebdde6d12

Contents?: true

Size: 341 Bytes

Versions: 6

Compression:

Stored size: 341 Bytes

Contents

class UnderOs::UI::Label < UnderOs::UI::View
  wraps UILabel, tag: 'label'

  def initialize(options={})
    super

    self.text = options.delete(:text) || ''
    @_.sizeToFit

    @_.numberOfLines             = 1;
    @_.adjustsFontSizeToFitWidth = true;
  end

  def text
    @_.text
  end

  def text=(text)
    @_.text = text
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
under-os-ui-1.4.0 lib/under_os/ui/label.rb
under-os-1.3.0 lib/under_os/ui/label.rb
under-os-1.2.1 lib/under_os/ui/label.rb
under-os-1.2.0 lib/under_os/ui/label.rb
under-os-1.1.0 lib/under_os/ui/label.rb
under-os-1.0.0 lib/under_os/ui/label.rb