Sha256: b832ffff3ffa5c42754621185d4b2ba577cb9a96375c2cfbaccf9d9eb1a9019f
Contents?: true
Size: 861 Bytes
Versions: 9
Compression:
Stored size: 861 Bytes
Contents
motion_require '_key_value_store' motion_require '_padding_attribute' motion_require '_control_content_alignment' class MPButton < UIButton include MotionPrime::SupportKeyValueStore include MotionPrime::SupportPaddingAttribute include MotionPrime::SupportControlContentAlignment attr_accessor :sizeToFit def setTitle(value) setTitle value, forState: UIControlStateNormal end def setImage(value) setImage value, forState: UIControlStateNormal end def setTitleEdgeInsets(value) @custom_title_inset_drawn = true super end def self.default_padding_left 5 end def self.default_padding_right 5 end def apply_padding!(rect) self.setTitleEdgeInsets(padding_insets) end def apply_padding? super && !@custom_title_inset_drawn end def drawRect(rect) apply_padding(rect) super end end
Version data entries
9 entries across 9 versions & 1 rubygems