O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Challenge: Colored Text

Now that you have completed the last challenge, your users will be able to tell by reading who sent which message. However, it is still not immediately apparent visibly which messages were sent from this window controller. In receiveDidSendMessageNotification(_:), if the notification was posted by self, add an attribute to the logLine attributed string to make that line blue. You will want to use NSForegroundColorAttributeName.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required