Book Image

Application Development in iOS 7

By : Kyle Begeman
Book Image

Application Development in iOS 7

By: Kyle Begeman

Overview of this book

Table of Contents (15 chapters)
Application Development in iOS 7
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding letterpress


Any text can appear to be letter pressed with the right amount of shadow and highlight. TextKit provides an easy and effective way to accomplish this with a new attribute parameter called NSTextEffectLetterpressStyle.

Here is an example with code:

NSDictionary *attributes = @{ NSForegroundColorAttributeName : [UIColor blueColor],
NSTextEffectAttributeName : NSTextEffectLetterpressStyle};
NSAttributedString* attrString = [[NSAttributedString alloc]
                                      initWithString:someString
                                      attributes:attributes];

Using attributed strings, we can apply this specific text effect in addition to other attributes. That's all it takes to apply this subtle effect! Take a look at our app as an example: