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

Launching an app doesn’t need to be daunting. Whether you’re just getting started or need a refresher on mobile app testing best practices, this guide is your resource! Brought to you in partnership with Perfecto

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!

Keep up with the latest DevTest Jargon with the latest Mobile DevTest Dictionary. Brought to you in partnership with Perfecto.

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 DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

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

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}