Book Image

Xcode 4 iOS Development Beginner's Guide

By : Steven F. Daniel
Book Image

Xcode 4 iOS Development Beginner's Guide

By: Steven F. Daniel

Overview of this book

<p>The iPhone is one of the hottest mobile devices on the planet. Whether you are just starting out with iOS Development or already have some knowledge in this area, you will benefit from what this book covers. Using this book's straightforward, step-by-step approach, you will go from Xcode 4 apprentice to Xcode 4 Jedi master in no time.</p> <p><i>Xcode 4 iOS Development Beginner's Guide</i> will help you learn to build simple, yet powerful applications for the iPhone from the ground up. You will master the Xcode 4 tools and skills needed to create applications that are simple yet, like Yoda, punch far above their weight.</p> <p>You will start by learning about the Xcode 4 Development Tools, Xcode IDE, iOS Simulator, Objective-C 2, and Organizer. Then you will jump straight in and create applications using Xcode and Interface Builder. You finish up by learning how to build, package, and distribute your application to the Apple App Store.</p> <p>This book will teach you how to go about building simple applications from scratch, you will master how to download and install the Xcode 4 Development Tools, get to know the development environment and how to build great user interfaces (using Interface Builder), learn about the different iOS frameworks, learn how to implement video and audio playback, learn how to sense motion using the Accelerometer and Gyroscope, and how to improve the reliability and performance of your applications.</p> <p>After reading <i>Xcode 4 iOS Development Beginner's Guide</i>, you will be able to write your own applications for the iPhone with supreme efficiency. There are a lot of examples and images provided to get you up to speed quickly.</p>
Table of Contents (20 chapters)
Xcode 4 iOS Development
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Pop Quiz Answers
Index

Time for action – binding our Controls using Outlets and Actions


Our final step will be to bind our control objects to our View Controller and connecting these via outlets and actions. We covered this in the section Making our Components work together in Chapter 3, Introducing Interface Builder.

  1. Once you have created your outlets within the PizzaOrdersViewController.h interface file, it should look something like this. What we are doing here is basically letting our View Controller know what controls we will be dealing with:

    #import <UIKit/UIKit.h>
    
    @interface PizzaOrdersViewController : UIViewController {
      IBOutlet UISwitch *toppingTomato;
      IBOutlet UISwitch *toppingOnion;
      IBOutlet UISwitch *toppingCapsicum;
      IBOutlet UISwitch *toppingOlives;
      IBOutlet UISwitch *toppingSalami;
      IBOutlet UISwitch *toppingMozarella;
      IBOutlet UISwitch *crustThin;
      IBOutlet UISwitch *crustThick;
      IBOutlet UISwitch *crustCheeseFilled;
      IBOutlet UITextField *TotalPayment;
      IBOutlet UIButton...