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-4.0.0 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.5.0 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.4.2 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.4.1 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.4.0 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.3.7 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.3.6 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.3.5 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.3.4 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.3.3 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.3.2 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.3.1 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.3.0 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.2.0 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.1.1 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.1.0 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.0.8 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.0.7 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.0.6 lib/ios/sugarcube-ui/nsattributedstring.rb
sugarcube-3.0.5 lib/ios/sugarcube-ui/nsattributedstring.rb