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

6 Delegation

In this chapter, you will begin a new application named SpeakLine. This application will use the NSSpeechSynthesizer class to enable users to type in a line of text and hear it spoken by the OS X speech synthesizer.

Figure 6.1  SpeakLine in action

SpeakLine in action

Let’s take a moment to talk about the two buttons and how they will function in the app. The buttons that start and stop the speech synthesizer will be disabled when appropriate: the Speak button will be disabled when the speech synthesizer is speaking; the Stop button will be disabled when the speech synthesizer is not speaking. A disabled button is grayed-out

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