248 terms

iOS5 App Development Basics

The essentials about iOS application development for iPhone/iPad/iTouch
Used to test an app without needing an actual physical device
iOS Simulator
Allows you to easily track multiple versions of your project
Snapshot feature
IDE for iPhone Development
"Application Programming Interface"
Dimensions of iPhone (in points)
320 x 480
Dimensions of iPad (in points)
1024 x 768
RAM for iPhone
Extension for an iPhone/iPad app
Language used to write iOS apps
Defines the functional building blocks (classes) that make iOS devices perform certain actions
Cocoa Touch
Collection of interface elements and data storage elements etc you can access from your applications
Cocoa Touch
iOS functional building blocks
Development approach (design pattern) to structure iOS applications
"Integrated Development Environment"
Object-oriented programming
Defines what an object can do
Class that builds upon another class
Class that another class inherits from
Process of creating an active object from a class
Calling a method is the same as...
...sending an object a message
Storage location for a piece of information
Storage place for a piece of information specific to a class
instance variable
Piece of information provided to a method when it is messaged
Way to refer to an object within its own methods
Master class in iOS
Objective-C is an extension (super set) of...
Files used to create a class
interface and implementation files
Extension for interface file
Extension for implementation file
Synonym for interface file
Used to define a list of all methods and properties a class uses
interface file
This file contains the code that makes everything 'work'
implementation file
Directive to include other interface files that an application might need to access
Syntax to include the fictitious user-created file: 'myFile.h'
#import "myFile.h"
Syntax to include UIKIT in a class
#import <UIKIT/UIKIT.h>
Delimiter for a list of protocols
Syntax for single-line comment
//blah blah blah
Syntax for block-comment
/*blah blah blah */
A class that implements a protocol is said to ____ to that protocol
#import <UIKit/UIKit.h>
@interface WelcomeViewController : UIViewController

The superclass for WelcomeViewController
Symbol used for inheritance
Companion to the @property directive
Something the simulator cannot reliably test
Used to set up an outgoing connection from the implementation code to the view
Term used to describe each screen of an iPhone app
Framework used to write iPhone apps
Cocoa Touch
Used to receive an event in code and trigger something
Document Apple uses to evaluate apps for the App Store
Human Interface Guide
This type of app is typically one screen, and gives you the basics with minimal interaction
These define to which messages the datasource and delegate respond
This type of app typically involves hierarchical data
This type of app is mostly custom controllers and graphics
Other name for an *.xib file
To use a new class you need to _____ it
The '@' symbol is shorthand for creating one of these
A tool in Xcode to help fix broken code
The HIG requires some kind of _____ element in a cell if there is more information available
strong and nonatomic are examples of ...
Attribute that informs the system that the object referred to needs to be kept around and not discarded from memory
Attribute that informs Xcode not to worry about different parts of the application using a property at the same time
Denotes a class method
Denotes an instance method
Return type indicating a method returns nothing
Used to indicate any type of object
Closes an interface file
Syntax for declaring a variable
<type> <variableName>;
Data type for whole numbers
Data type for numbers with 'tame' numbers of decimal points
Data type for highly precise numbers with huge numbers of decimal places
Syntax for declaring a string called 'userName'
NSString *userName;
Syntax for reserving memory and initializing an object
[[<class name> alloc] init];
Write a statement to declare and initialize a label object called 'myLabel'
UILabel *myLabel = [[UILabel alloc] init];
Write a statement to declare and initialize a label object called 'myLabel' to "GO!"
UILabel *myLabel = [[UILabel alloc] initWithString:@"GO!"];
Apple's classes often provide a special initialization method called a _____ method
int x = 6;
int y = 7;
float quotient = (float) x/y;
The statement that creates the variable 'quotient' is an example of ....
Syntax for sending an object a message with no parameters
[<object variable> <method name>];
Syntax for sending an object a message with one parameter (p1)
[<object variable> <method name>: p1];
If a method name includes a colon (:) this indicates a required _________
Indicates a lack of any value at all
Tests to see whether two values are equal
Tests to see whether two values are not equal
Implements a logical AND condition
Implements a logical OR condition
Name of the '|' symbol
Negation symbol
Two-way selection logic block
if(<boolean condition>){
/* stuff to do*/
} else{
/*stuff to do*/
Alternative selection mechanism when many conditions exist
Fixed iteration repetition control structure syntax
for(<initialization>;<test condition>;<update instruction>){
/*do this over and over*/
Shortcut for writing: count = count + 1;
Shortcut for writing: x = x - 1;
Shortcut for writing: y = y * 5;
y *= 5;
Precondition repetition structure syntax
while(<boolean expression>){
/*stuff to do here*/
Postcondition repetition structure syntax
/*stuff to do here*/
}while(<boolean expression>);
Prior to ARC, you used these terms alot
retain, release, dealloc, autorelease
Another name for format specification
Method used to print information in an output panel
Declare and initialize a string that says: "Hello World" whose identifier if 'phrase' . Use the shortest command possible.
NSString *phrase = @"Hello World";
Symbol often denoting a 'pointer'
NS stands for...
What's the difference between Cocoa and Cocoa Touch?
Cocoa is the development framework used for most native Mac OS X applications; Cocoa Touch is customized for a touch interface
4 Top down technology layers making up iOS
Cocoa Touch, Media, Core Services, Core OS
The first method called when a user taps an application icon
True or false: Beginning with iOS4, applications no longer terminate when the user presses the Home button
Every iOS application implements a subclass of _________
The ________ class provided a container for the management and display of views
Class of strings that can be changed
______ enable applications to store multiple pieces of information in a single object
An example of a common collection data type
Always used to end the list of objects when initializing an array
Class that creates an array capable of being changed after it is create
Class of collection data type which stores information as object/key pairs
Class used to work with dates as objects
Class that allows URL management
Single line text field
Multiline text entry block
Resembles a slot machine display
Opens the Xcode Quick Help Assistant
Option-click a symbol
The object currently in control and interacting with the user
First Responder
The name of the panel to the left of the Interface Builder Editor panel
Document Outline Area or Outline View
The Round Rect Button is found in this library
Object Library
What do the Autosizing settings of the Size Inspector do?
Determine how controls resize/reposition themselves when a device changes orientation
You have two labels in Interface Builder. One is selected (You clicked on it). How can you tell the distance between it and the other label?
Hold down the Option key and point to the other label. The distance will be shown
The Inspector you would use to tweak the way interface objects appear
Attributes Inspector
The Inspector you would use to control your layout in Interface Builder
Size Inspector
"Interface Builder"
The Inspector you would access to gain access to various accessibility attributes
Identity Inspector
Word used to indicate that a user can't interact with a given element
Another name for a 'button bar'
segmented control
An integrated web browser component
web view
A skeleton (holding place) or framework of code that will be completed in the future; provided initially so code will compile (but it may not function)
The Inspector you will need if you want to connect a custom class to an object in Interface Builder
Identity Inspector
Apps written to assist users with special disabilities
accessible apps
In the MVC design pattern for iOS apps, this aspect provides the underlying data and methods that offer information to the rest of the application
In the MVC design pattern for iOS apps, this aspect consists of the various onscreen 'widgets' a user can interact with
In the MVC design pattern for iOS apps, this aspect is responsible for receiving user input and acting accordingly, and serves as a 'bridge' between the other two components. It is the backbone of the app.
The goal of the MVC design pattern
Isolate the functional components of an app
An _______ is used to enable your code to talk to objects within views
True or false: Although it is possible to declare an instance variable and then define a corresponding property, you may also use @property alone to implicitly declare a matching instance variable
Creates 'getters' and 'setters'
@synthesize directive
An _______ is used to 'advertise' a method in your code that should be called when a certain event takes place
Declaring a method in an interface file, before it is actually implemented is called _______ the method
What event do you use to detect a button tap?
Touch Up Inside
Which Apple project template creates a simple view/view controller application
Single View Application
What is the relationship between storyboards, scenes, views, and view controllers?
A scene is where you edit a view and assign a controller to it. Storyboards are the files that contain all the scenes you will use in a project.
"Software Development Kit"
Extension for MainStoryboard
Purpose of the "Auto-enable Return Key" attribute for text fields
Disables the Return key on the keyboard unless the user has entered at least a single character of input into the field
Purpose of "Secure" attribute for text fields
Treats the field as a password, hiding each character as it is typed
What are data detectors?
Attribute settings for some onscreen controls (like text areas) that analyze content and provide helpful links based on what they find. For example, phone numbers can be touched to dial the phone; web addresses can launch Safari if tapped, etc
A common button type that indicates additional information is available
detail disclosure
Recommended image type for button graphics
How do you show a storyboard file as source code?
Right-click on it in the Navigator panel and choose "Open as..." and select "Source Code"
What computer language is the storyboard written in?
Key sequence to open the Project Navigator (left panel)
For a text field, what does the "Clear Button" look like?
Gray circle with a white "X" in it, positioned to the right of the text field box
How do you get rid of an onscreen keyboard?
Send the 'resignFirstResponder' message to the object that currently controls the keyboard (such as a text field)
eXtensible Markup Language
Used to display image file resources and show simple animations
image view
Class used for creating image views
Under what circumstances would you need an outlet for a button if it's just needed to trigger an action?
To provide a convenient way of setting the button's title in the code
Key sequence to open the Attributes Inspector
Property affecting an element's transparency
A fully opaque image has an _______ property value of ______
alpha ... 1
A fully transparent image has an _____ property value of _____
alpha ... 0
If you have an image file called 'myImage.png' and you make a hi-res version for the retina display, what should be the name of the new file?
Scaling factor to make an image suitable for retina display
File name suffix indicating an image is suitable for retina display
This element should 'always' accompany a slider to indicate its purpose
In a stepper control, when this attribute option is checked, the stepper's value is automatically set to the minimum value when the maximum value is exceeded (or vice versa).
Boolean for 'true' in Objective-C
Boolean for 'false' in Objective-C
Expression to create a random number in [0,20];
rand( )%21
Modulus (remainder) operator
Formatting placeholder for strings
Formatting placeholder for integers
Formatting placeholder for a floating point value with one digit on the left of the decimal and two digits on the right
What property needs to be set before a scroll view (UIScrollView) will scroll?
What type of object does a web view expect as a parameter when loading a remote URL?
Define a collection of methods to perform a task
A class that manages the user's interaction with the iDevice
view controller
The visual layout that a user sees on the screen
A unique combination of view controller and view
A transition between scenes, frequently with a visual transition effect applied
A view that is displayed on top of an original view when user interactions are required
modal views
This file contains the scene, segue and relationship definitions for your project
Correct the error: label.text = "Hello World
label.text=@"Hello World!";
Character used to show an element as a literal string
Crash statement likely when an NSString is assigned a value with an incorrect format
Program received signal: EXC_BAD_ACCESS
Key sequence to save an Xcode file
Key sequence to run an app in Xcode
Name of the drop-down menu in Xcode that lets you select the device used with the iOS Simulator
A file folder in the navigator panel is called a ________
Key sequence to hide/show Navigator View
Key sequence to hide/show Utilities View
Option+Command+ 0
Key sequence to hide/show the Assistant Editor
Key sequence on a Mac to select between open application
Command + Tab
Key sequence to open the Standard Editor
Connections between Objects in the Interface Builder and the header file are formed by _____-_______ from the object to the proper place in the header file
User Interface
Proper way to pronounce a *.xib file
Nib (but a few call it 'zib' but that's not preferred)
Any 'directive' statement begins with this symbol
True or false: iPhone and iPad do not support .png transparency
Size of iPhone 'lo-res" icon image in pixels
57 x 57
Size of iPhone retina icon image in pixels
114 x 114
'plist' stands for...
property list
This keyword in the property directive is related to the concept of mutability and basically asks Apple to handle the details. This is the more 'relaxed' , less 'powerful' setting of two possibilities
This keyword in the property directive is related to memory management and refers to the idea that we want to maintain control of memory issues
You have an instance variable called 'myLabel' that is a member of UILabel. In an app, you set it's text property to "Howdy" with the correctly-written command: myLabel.text = @"Howdy"; Re-write this command using [ ] message-sending syntax
[myLabel setText:@"Howdy"];
In the US, the '#' symbol is often called the ____ symbol
In the UK, the '#' symbol is often called the ____ symbol
Data type for true/false type variables
Typical header syntax for a button that will be applying the 'moveMe' action in an app
- (IBAction)moveMe:(id)sender;
@property directives should be placed ____ (above or below) any IBActions in the header file
@synthesize directives should be placed _____ (above or below) the @implementation directive in the implementation file
In your implementation file, the _____ method (provided in stub form by Apple) runs after machine language code reserves some space in memory for your View. This method is often used to create a 'clean slate' as an app opens.
Write a line of code creating a pointer to a wall paper image called 'wp1' that refers to a resource in an app with the file name 'wallPaper_01.png'
UIImage *wp1 = [UIImage imageNamed:@"wallPaper_01.png"];
An array of background images called 'bgImages' has been declared as an instance variable in your header file. You have created a set of 5 background images stored in UIImage variables wp1 through wp5. Write a line of code that initializes the array.
bgImages = [[NSArray alloc] initWithObjects: wp1, wp2, wp3, wp4, wp5, nil];
Scaling, rotation, and translation are the most commonly used manipulations supported by _____ transforms, but skewing is also possible.
Class used for image manipulations such as scaling, rotation and translation. Its data structure represents a matrix used for affine transformations.
A view has a 'Shrink' button whose label needs to change once it is clicked to 'Grow'. Write a 'message' type command to change it's label to 'Grow'
[shrinkButton setTitle:@"Grow" forState: UIControlStateNormal];
An app has boolean variables 'hasShrunk' and 'hasMoved'. Write a boolean condition that checks if each are true
hasShrunk==YES && hasMoved == YES
This Xcode utility allows you to check CPU usage, memory allocation and network/file access (among other things)
A virtual 'box' for organizing related projects
You are creating an app for a company whose URL is http://www.fannypackapps.com . What should be the company identifier for the app when you begin the project?
What are the guidelines for the class prefix for a project?
Something unique, based on the app's name (perhaps abbreviated). Avoid 'NS' or 'UI' since they are used in Apple's frameworks. A framework or library should always be prefixed. For a simple app, they are not necessary.
Apps that provide easy access to a single screen of information with a backside view for modifying preferences
Utility apps
If you wish to 'echo print' breadcrumb info as you develop your app, this panel must be visible
The Console area of the Debug area
The 'First Responder' in a scene is not an object it is considered a ________
To zoom between an overview of the entire storyboard and the actual size view, ______ the storyboard background.
To unroll or roll up a hierarchy of files, objects or classes, you click the ______ _______ at the root element
disclosure triangle
______ are variables that can store a ____ to an object.
Outlets ... pointer
_____ are methods that we can connect to events.
______ and ______ define the connections between scenes.
Seques .... relationships
In most graphical user interfaces, a _____ view is a view that must be dismissed ('OK' button, 'Cancel' button for example) before the user can perform any other actions in the application.
Code fragment for echo printing the name of a function as it loads (for tracing the sequence of code in a project...leaving breadcrumbs)
NSLog(@"%s", __FUNCTION__);
An alternative way to see the connections between an object in the Interface Builder and it's code in Xcode without using the Connections inspector
Control-click on the View Controller's icon to bring up a Connections dialog
The bar across the top of the Editor area that shows you the item you are editing
Jump Bar
The Utilities area has two sections: ______ and ______
inspector and library
The library that contains the objects you can add to a view or XIB file
Object library
Templates fill in a bunch of ______-_______ code that serves as a framework in which to write future implementations
"Build and run" keyboard shortcut
Memory aid for keyboard shortcuts in the Navigator panel
Command plus the navigator's position in the selector. For example, the project navigator shortcut is Command-1
You have created some 'breadcrumbs' using NSLog to trace the path of your code, and the debug area is open, yet you see no information in the panel. What's the problem and what is the solution?
Look at the three icons at the upper left portion of the Debug console. The far left one, "Show only the Variables View" will not show the NSLog-ed information. Click the center icon ("Show the Variables View and the Console") or the right icon ("Show only the Console") and you will see your logged information.
Combining two messages into a single line of code
nested message send
Given: [graduationParty addAttendee: @"Aunt Jane" withDish: @"deviled eggs"]; The 'receiver' is _______; the 'selector' is _________
graduationParty ... addAttendee:withDish