Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

CoreTextArcView in iOS

DZone's Guide to

CoreTextArcView in iOS

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

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!

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

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

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}