Over a million developers have joined DZone.

CoreTextArcView in iOS

· Mobile Zone

Ever tried to adapt CoreTextArcCocoa to iOS and decided in short order “nah, the artists can sort this out?” Yep, us too. For next time that situation comes up, there’s a good-looking port of it to be found in this Stack Overflow question:

I adapted the CoreTextArcCocoa sample project, above for my own use, and thought I’d share it here.

I added a few other features as well, such as the ability to set the arc size to something smaller than 180, and the text color and offset shift as properties (so that you don’t have to have a huge frame to show the whole text).

File: CoreTextArcView.m (iOS version)

Abstract: Defines and implements the CoreTextArcView custom UIView subclass to draw text on a curve and illustrate best practices with CoreText…

Yep, that’s some handy stuff. Grab it from the link and give it a voteup!

Topics:

Published at DZone with permission of Alex Curylo, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}