Class: Motion::Xray::XraySelectedToolbarItem

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from UIView

build_xray, #xray, #xray_subviews

Instance Attribute Details

#itemObject

Returns the value of attribute item


127
128
129
# File 'lib/motion-xray/views/xray_toolbar.rb', line 127

def item
  @item
end

Instance Method Details

#corner_radiusObject


148
149
150
# File 'lib/motion-xray/views/xray_toolbar.rb', line 148

def corner_radius
  5
end

#drawRect(rect) ⇒ Object


152
153
154
155
# File 'lib/motion-xray/views/xray_toolbar.rb', line 152

def drawRect(rect)
  :white.uicolor.setFill
  UIBezierPath.bezierPathWithRoundedRect(bounds, cornerRadius:corner_radius).fill
end

#initWithFrame(frame) ⇒ Object


129
130
131
132
133
134
# File 'lib/motion-xray/views/xray_toolbar.rb', line 129

def initWithFrame(frame)
  super.tap do
    self.backgroundColor = :clear.uicolor
    @item = nil
  end
end