iOS5 App Development Basics Flashcards
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
Xcode
API
Application Programming Interface
Dimensions of iPhone (in points)
320 x 480
Dimensions of iPad (in points)
1024 x 768
RAM for iPhone
512MB
Extension for an iPhone/iPad app
xcodeproj
Language used to write iOS apps
Objective-C
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
Classes
Development approach (design pattern) to structure iOS applications
Model-View-Controller
MVC
Model-View-Controller
IDE
Integrated Development Environment
OOP
Object-oriented programming
Defines what an object can do
class
Class that builds upon another class
subclass
Class that another class inherits from
superclass
Process of creating an active object from a class
instantiation
Calling a method is the same as…
…sending an object a message
Storage location for a piece of information
variable
Storage place for a piece of information specific to a class
instance variable
Piece of information provided to a method when it is messaged
parameter
Way to refer to an object within its own methods
self
Master class in iOS
NSObject
Objective-C is an extension (super set) of…
…C
Files used to create a class
interface and implementation files
Extension for interface file
h
Extension for implementation file
m
Synonym for interface file
header
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
import
Syntax to include the fictitious user-created file: ‘myFile.h’
import myFile.h
Syntax to include UIKIT in a class
import
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
conform
The superclass for WelcomeViewController
UIViewController
Symbol used for inheritance
:
Companion to the @property directive
@synthesize
getters
accessors
setters
mutators
Something the simulator cannot reliably test
performance
Used to set up an outgoing connection from the implementation code to the view
IBOutlet
Term used to describe each screen of an iPhone app
view
Framework used to write iPhone apps
Cocoa Touch
Used to receive an event in code and trigger something
IBAction
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
utility
These define to which messages the datasource and delegate respond
protocols
This type of app typically involves hierarchical data
productivity
This type of app is mostly custom controllers and graphics
immersive
Other name for an *.xib file
nibfile
To use a new class you need to _____ it
instantiate
The ‘@’ symbol is shorthand for creating one of these
NSString
A tool in Xcode to help fix broken code
debugger
The HIG requires some kind of _____ element in a cell if there is more information available
disclosure
strong and nonatomic are examples of …
attributes
Attribute that informs the system that the object referred to needs to be kept around and not discarded from memory
strong
Attribute that informs Xcode not to worry about different parts of the application using a property at the same time
nonatomic
Denotes a class method
+
Denotes an instance method
-
Return type indicating a method returns nothing
void
Used to indicate any type of object
id
Closes an interface file
@end
Syntax for declaring a variable
;
Data type for whole numbers
int
Data type for numbers with ‘tame’ numbers of decimal points
float
Data type for highly precise numbers with huge numbers of decimal places
double
Syntax for declaring a string called ‘userName’
NSString *userName;
Syntax for reserving memory and initializing an object
[[ 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
convenience
The statement that creates the variable ‘quotient’ is an example of ….
casting
Syntax for sending an object a message with no parameters
[ ];
Syntax for sending an object a message with one parameter (p1)
[ : p1];
If a method name includes a colon (:) this indicates a required _________
parameter
Indicates a lack of any value at all
nil
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
pipe
Negation symbol
!
Two-way selection logic block
if(){
Alternative selection mechanism when many conditions exist
switch
Fixed iteration repetition control structure syntax
for(;;){
Shortcut for writing: count = count + 1;
count++;
Shortcut for writing: x = x - 1;
x
Shortcut for writing: y = y * 5;
y *= 5;
Precondition repetition structure syntax
while(){
Postcondition repetition structure syntax
do{
Prior to ARC, you used these terms alot
retain, release, dealloc, autorelease
Another name for format specification
token
Method used to print information in an output panel
NSLog
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…
NeXSTEP
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
main()
True or false: Beginning with iOS4, applications no longer terminate when the user presses the Home button
true
Every iOS application implements a subclass of _________
UIApplication
The ________ class provided a container for the management and display of views
UIWindow
Class of strings that can be changed
NSMutableString
______ enable applications to store multiple pieces of information in a single object
Collections
An example of a common collection data type
NSArray
Always used to end the list of objects when initializing an array
nil
Class that creates an array capable of being changed after it is create
NSMutableArray
Class of collection data type which stores information as object/key pairs
NSDictionary
Class used to work with dates as objects
NSDate
Class that allows URL management
NSURL
Single line text field
UITextField
Multiline text entry block
UITextView
Resembles a slot machine display
UIPicker
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
IB
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
static
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)
stub
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
model
In the MVC design pattern for iOS apps, this aspect consists of the various onscreen ‘widgets’ a user can interact with
view
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.
controller
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
IBOutlet
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
true
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
IBAction
Declaring a method in an interface file, before it is actually implemented is called _______ the method
prototyping
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.
SDK
Software Development Kit
Extension for MainStoryboard
storyboard
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
png
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?
XML
Key sequence to open the Project Navigator (left panel)
Command+1
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)
XML
eXtensible Markup Language
Used to display image file resources and show simple animations
image view
Class used for creating image views
UIImageView
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
Option+Command+4
Property affecting an element’s transparency
alpha
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?
myImage@2x.png
Scaling factor to make an image suitable for retina display
2
File name suffix indicating an image is suitable for retina display
@2x
This element should ‘always’ accompany a slider to indicate its purpose
label
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).
wrap
Boolean for ‘true’ in Objective-C
YES
Boolean for ‘false’ in Objective-C
NO
Expression to create a random number in [0,20];
rand( )%21
Modulus (remainder) operator
%
Formatting placeholder for strings
%@
Formatting placeholder for integers
%d
Formatting placeholder for a floating point value with one digit on the left of the decimal and two digits on the right
%1.2f
What property needs to be set before a scroll view (UIScrollView) will scroll?
contentSize
What type of object does a web view expect as a parameter when loading a remote URL?
NSURLRequest
Define a collection of methods to perform a task
protocols
A class that manages the user’s interaction with the iDevice
view controller
The visual layout that a user sees on the screen
view
A unique combination of view controller and view
scene
A transition between scenes, frequently with a visual transition effect applied
segue
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
storyboard
!;
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
Command+S
Key sequence to run an app in Xcode
Command+R
Name of the drop-down menu in Xcode that lets you select the device used with the iOS Simulator
Scheme
A file folder in the navigator panel is called a ________
Group
Key sequence to hide/show Navigator View
Command+0
Key sequence to hide/show Utilities View
Option+Command+ 0
Key sequence to hide/show the Assistant Editor
Option+Command+Return
Key sequence on a Mac to select between open application
Command + Tab
Key sequence to open the Standard Editor
Command+Return
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
control-dragging