Class: UnderOs::UI::Label

Inherits:
View
  • Object
show all
Defined in:
lib/under_os/ui/label.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Label

Returns a new instance of Label.



4
5
6
7
8
9
10
11
12
# File 'lib/under_os/ui/label.rb', line 4

def initialize(options={})
  super

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

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

Instance Method Details

#textObject



14
15
16
# File 'lib/under_os/ui/label.rb', line 14

def text
  @_.text
end

#text=(text) ⇒ Object



18
19
20
# File 'lib/under_os/ui/label.rb', line 18

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