Sha256: 2f711a698053aa4795906d79457855d724acabe0a5cf60b46b47cdfffb021e25

Contents?: true

Size: 259 Bytes

Versions: 30

Compression:

Stored size: 259 Bytes

Contents

class NSAttributedString

  # @return [UILabel]
  def uilabel
    UILabel.alloc.initWithFrame([[0, 0], [0, 0]]).tap do |label|
      label.attributedText = self
      label.backgroundColor = :clear.uicolor
      label.sizeToFit
      label
    end
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
sugarcube-3.0.4 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.0.3 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.0.2 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.0.1 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.0.0 lib/ios/sugarcube-uikit/nsattributedstring.rb
sugarcube-2.12.3 lib/ios/sugarcube-uikit/nsattributedstring.rb
sugarcube-2.12.2 lib/ios/sugarcube-uikit/nsattributedstring.rb
sugarcube-2.12.1 lib/ios/sugarcube-uikit/nsattributedstring.rb
sugarcube-2.12.0 lib/ios/sugarcube-uikit/nsattributedstring.rb
sugarcube-2.11.1 lib/ios/sugarcube-uikit/nsattributedstring.rb