On Thu, Mar 30, 2017, at 10:18 AM, Eric E. Dolecki wrote:
> I have a very wide UILabel that will take different text over time.
> Single
> line. No attributed.
> 
> I would like to position an image to the left of the first character in
> the
> label any time it's updated. So I need to get a CGRect or something of
> the
> text within the UILabel itself. I know I did this years ago, but I can't
> remember how I did it.
> 
> Looking to do this in Swift. Any ideas or things I'm blanking on?

I think you’re looking for
UILabel.textRect(forBounds:limitedToNumberOfLines:).

--Kyle Sluder

> 
> Thanks,
> Eric
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to