Sha256: 0b440fdd31b1453998cc13078b02e31ca80dfac63008bac0c2b1501c9dcce7a0
Contents?: true
Size: 442 Bytes
Versions: 3
Compression:
Stored size: 442 Bytes
Contents
class RMXAutoLayoutLabel < UILabel def layoutSubviews super if numberOfLines == 0 if preferredMaxLayoutWidth != frame.size.width self.preferredMaxLayoutWidth = frame.size.width setNeedsUpdateConstraints end end end def intrinsicContentSize s = super if numberOfLines == 0 # found out that sometimes intrinsicContentSize is 1pt too short! s.height += 1 end s end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rmx-0.6.2 | lib/motion/RMXAutoLayoutLabel.rb |
rmx-0.6.1 | lib/motion/RMXAutoLayoutLabel.rb |
rmx-0.6.0 | lib/motion/RMXAutoLayoutLabel.rb |