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
- 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.
- 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.
- 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
- Smalltalk.
- The interface or header file with a
.h
file extension and the implementation file with a.m
file extension. - The
NSObject
class. - The following code defines the
ChapterExercise
class with a single method namedwriteAnswer
, which takes no arguments and returns nothing:@interface ChapterExercise : NSObject - (void)writeAnswer; @end
- You would use this code to instantiate the
ChapterExercise
class:ChapterExercise *anInstance = [[ChapterExercise alloc] init];
- The
retain
keyword increments the reference count, whereas therelease
keyword decrements it. - ARC stands for Automatic Reference Counting.
- The
strong
keyword indicates the class owns the instance of the object, and it will not be deallocated as long as the strong ...
Get Beginning iOS Programming: Building and Deploying iOS Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.