O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

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

Coding the App

Now that we’ve added a button to our view and wired it up, we can run the app again. The app now has the Send Tweet button, and we can even tap it, but it doesn’t do anything. In fact, we don’t even know if we’ve made our connections correctly. One thing we can do as a sanity check is to log a message to make sure our code is really running. Once that’s verified, we can move on to implementing our tweet functionality.

Logging

On iOS, we can use the function println to write a string out to the system’s log file. We can implement our action to just log a message every time the button is tapped and thereby verify that the connections are working. Select ViewController.swift in the File Navigator (1) to edit its source code and rewrite ...

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