Class: PaddedLabel
- Inherits:
-
UILabel
- Object
- UILabel
- PaddedLabel
- Defined in:
- lib/project/views/padded_label.rb
Instance Method Summary collapse
Instance Method Details
#drawTextInRect(rect) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/project/views/padded_label.rb', line 2 def drawTextInRect(rect) insets = UIEdgeInsets.new(0, padding, 0, padding) padded_rect = UIEdgeInsetsInsetRect(rect, insets) super(padded_rect) end |
#padding ⇒ Object
14 15 16 |
# File 'lib/project/views/padded_label.rb', line 14 def padding @padding || 0 end |
#padding=(padding) ⇒ Object
10 11 12 |
# File 'lib/project/views/padded_label.rb', line 10 def padding=(padding) @padding = padding end |