Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS

Bold & Non-Bold Text In A Single UILabel?

I was wondering if its possible to have two separate font sizes/styles for two different parts of the same string: (See picture) ![Example of two different font sizes in same string][1]

http://i.stack.imgur.com/sUv5z.png

Is there any possible way to do this without going to the hassle of combining two strings, (Basically I'm pulling quotes from an array but I want to have who said the quote in a different font size/style from the quote itself)

// I believe it has something to do with attributed text but still have no idea..

Kind Regards,

Jack

2 Answers

There's a helpful Stack Overflow question on this point:

http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel

Looked at it already, It seems to be for Objective-C though, I'm looking for an answer in Swift. Thanks anyway :)