O'Reilly logo

iOS Programming: The Big Nerd Ranch Guide by Joe Conway, Aaron Hillegass

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

Implementing Methods

Methods and instance variables are declared in the header file (in this case, QuizViewController.h), but the actual code for the methods is placed in the implementation file (in this case, QuizViewController.m). Select QuizViewController.m in the project navigator.

When you create a new application in Xcode, the template fills in a lot of boiler-plate code. This code may be useful for you later on, but for now, it is distracting. So we’re going to remove it. In QuizViewController.m, delete everything between the @implementation and @end directives so that QuizViewController.m looks like this:

@​i​m​p​l​e​m​e​n​t​a​t​i​o​n​ ​Q​u​i​z​V​i​e​w​C​o​n​t​r​o​l​l​e​r​

@​e​n​d​

When the application launches, the QuizViewController ...

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