Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    UILabel doesn't have a origin nor size property on iOS? It should probably be label.frame.origin.x etc. Commented Mar 26, 2011 at 10:58
  • 1
    Instead of using sizeWithAttributes then setting the frame, you can just call sizeToFit to work-out and set the frame size in one quick step. Commented Aug 13, 2015 at 8:37
  • @Hermang, thanks for editing the answer to bring it up to date. Commented Nov 2, 2015 at 22:29