O'Reilly logo

Beginning iOS Programming: Building and Deploying iOS Applications by Nick Harris

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

AppendixAnswers to Exercises

At the end of each chapter, there were some exercises to help you determine if you understood the material in that chapter correctly. Here are the answers to those questions.

CHAPTER 1 ANSWERS

  1. You need to keep in mind how your app’s name will look when displayed on the home screen of an iPhone or iPad. Typically, you have approximately 12 characters before the name is abbreviated.
  2. You need to scope your app to keep it useful without adding too many features that users may find confusing. You don’t want a feature list that would take years to implement.
  3. If you app duplicate features that are in Apple apps, your app may be rejected when submitted for the App Store. It is best to avoid almost any overlap.

CHAPTER 2 ANSWERS

  1. Smalltalk.
  2. The interface or header file with a .h file extension and the implementation file with a .m file extension.
  3. The NSObject class.
  4. The following code defines the ChapterExercise class with a single method named writeAnswer, which takes no arguments and returns nothing:
    @interface ChapterExercise : NSObject
    
    - (void)writeAnswer;
    
    @end
  5. You would use this code to instantiate the ChapterExercise class:
    ChapterExercise *anInstance = [[ChapterExercise alloc] init];
  6. The retain keyword increments the reference count, whereas the release keyword decrements it.
  7. ARC stands for Automatic Reference Counting.
  8. The strong keyword indicates the class owns the instance of the object, and it will not be deallocated as long as the strong ...

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