O'Reilly logo

iOS 9 SDK Development 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

Making Connections

So, how do we get the Send Tweet button tap to do something? After all, we’ve been creating the user interface in the Main.storyboard file, but it doesn’t look like there’s any place in this editor to start writing code.

In iOS, we use Interface Builder connections to tie the user interface to our code. Using Xcode, we can create two kinds of connections:

  • An outlet connects a variable or property in code to an object in a storyboard. This lets us read and write the object’s properties, like reading the value of a slider or setting the initial contents of a text field.

  • An action connects an event generated by a storyboard object to a method in our code. This lets us respond to a button being tapped or a slider’s value changing. ...

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