Class: Motion::Xray::XrayHeaderBackground

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from UIView

build_xray, #xray, #xray_subviews

Instance Attribute Details

#labelObject

Returns the value of attribute label.



4
5
6
# File 'lib/motion-xray/views/xray_headers.rb', line 4

def label
  @label
end

Instance Method Details

#initWithFrame(frame) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/motion-xray/views/xray_headers.rb', line 6

def initWithFrame(frame)
  super.tap do
    self.layer.borderWidth = 1
    self.layer.borderColor = :xray_dashboard_label_border.uicolor.CGColor
    self.layer.backgroundColor = :xray_dashboard_label_bg.uicolor.CGColor
  end
end

#text=(str) ⇒ Object



22
23
24
# File 'lib/motion-xray/views/xray_headers.rb', line 22

def text=(str)
  label.text = str
end