Recipe: Building a Better Text Editor (Part II)

Starting with iOS 6, text views and text fields work with attributed text strings (that is, strings that support styles, not just plain-text ones). This allows you to create highly featured text views and fields with multiple fonts, styles, and colors.

Much of this functionality prior to iOS 7 leaned heavily on Core Text for anything more than simple styles. With Text Kit, that support has been simplified and expanded. For simple text editors, it takes very little work to add support for basic styles: bold, italic, and underline.

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.