Class: Motion::Xray::XrayToolbarItem

Inherits:
UILabel
  • Object
show all
Defined in:
lib/motion-xray/views/xray_toolbar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from UILabel

xray

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



160
161
162
# File 'lib/motion-xray/views/xray_toolbar.rb', line 160

def name
  @name
end

Instance Method Details

#initWithText(text) ⇒ Object



162
163
164
165
166
167
168
169
# File 'lib/motion-xray/views/xray_toolbar.rb', line 162

def initWithText(text)
  initWithFrame(CGRect.empty).tap do
    self.backgroundColor = :clear.uicolor
    self.font = :label.uifont(12)
    self.text = text
    sizeToFit
  end
end