Text Kit Tutorial: Getting Started | Ray Wenderlich

In this tutorial, you’ll learn how to use Text Kit in your iOS app to layout your text and create different visual styles.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5960-text-kit-tutorial-getting-started

Hi,
Why does using letterpressStyle slows down the app?

@bmorefield Can you please help with this when you get a chance? Thank you - much appreciated! :]

@ilhankorkmaz The letterpress effect needs additional graphics for the shadows and highlights that give the appearance of text pressed into paper. Those added graphics require extra graphics resources for display compared to the standard font.

All of you, great tutorial. Helped me understand this segment much better.
One question: Now that I understand the the features of Text Kit, can you point me in the direction of allowing the users to select these options, but as a smaller popup view, as Apple does, rather than asking them to insert characters?
Not necessarily asking how to do it, but pointing me in the right direction.
Thank you!
David

@xs6615 To clarify, are you looking to provide the user options so they can set the formatting of text in an app?

Yes, they press and hold and a small popup appears with options, such a Bold, italic…

@xs6615 In short, you’d need to build a UI that shows the options. This could be a button bar with tapping each button linked to an action or a popup menu using a method like UIAlertController. When one of these is selected, you’d change the text using the calls from the tutorial to reflect the user’s request.

Thank you, I will give it a try

In the performReplacementsForRange method, the extendedRange variable is initialized and then its value is overwritten without reference it. It seems like the initial value isn’t necessary.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!