Level 7 Level 9
Level 8

X-Code/Objective C review

104 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

True or false: Beginning with iOS4, applications no longer terminate when the user presses the Home button
int main ()
Which is the proper definition of the main function in C?
printf("Hello World ");
How do you call the print function in C?
#include <stdio.h>
_______unstable = _______;
int unstable = 25;
float radius = 14.5;
Create a float variable named 'radius' with the value '14.5' using C
#include <stdio.h>
Using C add a print statement that will print the words "There are 7 days in a week".
What special formatting characters are used in C within a string to print variables in appropriate ways?
A Statement
A line of code that ends with a ";" is called...
Javascript, Python, PHP, C#, C++, Java, PERL
What other programming languages are based in C?
What are some examples of "short-cut" notation in C?
a = a * b --> a * =b
Represents a list of data
int magic_numbers[] = {3,
numbers: 3, 6, 9 12. Write a print statement that will print "3 is a magic number."
char letters[] = {"a", "b", "c", "d"};
for(int i=0; i<5; i++){}
Write a valid for loop that will execute exactly 5 times.
Do-while loop, For loop, While loop
Name the three types of looping constructs in C
the following: Array real_numbers is __ bytes.
printf("Array real_numbers is %ld bytes./n", sizeof
When is auto-incrementing done within a code block?
While Loop
repeatedly executes a target statement as long as a given condition is true.
Do While
a variation of the While Loop in which the application is written "backwards" with the "Do
re-route the flow of information through your program.
Else-If Statements
Allows you to string if statements together
Switch Statement
In the switch statement, a value is compared a set of known values, called "cases". When
a variable whose value is the address of another variable, i.e., direct address of the memory location
Symbol often denoting a 'pointer'
Dereferencing a pointer means...
getting the value that is stored in the memory location pointed by the
Symbol that indicates the address of a variable
char *cookies;
in your array
int *myEven;
in the notes).
declaration that defines a list of variables to be placed under one name in a block of memory, allowing
Definition --
general syntax to define a struct and then declare the associated variable
each individual type of data within a struct
the ability of an object in Objective C being "composed of" various other objects
Object-oriented programming (OOP)
programming language model organized around objects rather than "actions"
main() function
serves as the root of an Objective-C application. Looks like:
extension for interface file
extension for implementation file
header / interface file
Used to define a list of all methods and properties a class uses
Describes the behaviour and properties common to any particular type of object. You need to both allocate and initialize an object to be able to use it.
Inherits all the behaviours and properties defined by the parent. Can define its own additional behaviour and properties or override the behaviour of the parent class.
allows a class to be defined that has a certain set of characteristics (such as methods and
Symbol used for inheritance
Setters and Getters can be replaced by _______ in Objective C to make the code less bulky and simpler.
An example of a common collection data type
cannot dynamically add or remove items
@[ ]
Arrays can be defined as literals using the _______ syntax in Objective C
NSArray *arrayName = [[NSArray alloc]
Syntax to declare, allocate, and initialize an array in Objective C
for (NSString *string in arrayName) {
Syntax to use a 'for' loop in Objective C
Syntax to access items in an array:
NSString *newVariableName = arrayName[# of position desired in array];
Class that creates an array capable of being changed after it is create
Syntax for NSMutableArray
NSMutableArray *arrayName = [[NSMutableArray alloc] init];
[arrayName removeObjectAtIndex:#toRemove];
Syntax to remove an item from the array:
is a reusable software platform for accelerating the development of an application. Provides basic
wrapper class for number data types, such as int, double, and float. Can be added to an array.
The '@' symbol is shorthand for creating one of these
String Literal
The easiest way to declare and initialize a string / Literally defines a string and its contents.
Joining two or more strings into one. Uses the method stringByAppendingString
Master class in iOS
Get method
gets the value of an instance variable
Set method
sets the value of an instance variable
replaces the set and get method for each instance variable. Has two attributes: atomic/nonatomic
the default property attribute, meant for a multi-threaded environment; Multiple threads/processes can be
attribute that allows for faster access to a property in a non-multi-threaded environment
Attribute that informs the system that the object referred to needs to be kept around and not discarded from memory
Child --> Parent relationship; specifies a non-owning relationship to the destination object, the system
property of the UITableViewController connects to the table view displayed on the screen
a list of methods.
Protocol used to figure out how the data is displayed in a table view such as row height,
Subclass of tableViewController; Creates a controller object that manages a table view;
allows us to choose which object within the array we want to use, by calling on its index location
Method that helps manage memory efficiently by reusing table view cells
Asks the data source for a cell to insert in a particular location of the table view;
JavaScript Object Notation (JSON)
a data format that is easy for computers to parse (separate into sections)
model-view-controller pattern (MVC)
proposes three main components or objects to be used in software
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
an object that draws content in a rectangular area and handles events caused by user's touches.
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.
Single Responsibility Principle
Every class should have a single responsibility
Class that allows URL management
method that will download data from a previously created URLobject into the NSData object; allows you to
taking a stream of data that is in a machine-readable format and storing or streaming that data
Song *countrySong = [[Song alloc] init];
Create an instance of Song with alloc and init.
Any assumptions you make will always be
What assumptions can you make about downloading data from the internet?
By accessing the property
How do you get access to the current view controller in a Navigation stack?
Property of the navigation controller that holds an array of all its view controllers
Navigation Controller
convenience class that presents a navigation toolbar to manage hierarchal data and its
servers on the internet where data and/or functionality are stored
iOS controller that lets you capture photos and video
a container for app's visible content.
The superclass for WelcomeViewController
Convenience Constructor
Allows you to declare the variable and load value in the same step; Method that performs
the return type for functions that don't return anything
Returns an NSNumber object initialized to contain a given value, treated as an int
Defines the attributes and behavior of the cells that appear in UITableView objects; Return type
identifier (segue)
a string that an application uses to distinguish one segue from another, readonly
a transition between scenes
intercepts a segue once it has been triggered so that it can pass any needed data to the
represents the path to a specific node in a tree of nested array collections; Uses two properties
used to parse JSON and store it in an NSDictionary object.
refers to the parent class within an implementation
Way to refer to an object within its own methods
you may also use @property alone to implicitly declare a matching instance variable
information to the rest of the application
accordingly, and serves as a 'bridge' between the other two components. It is the backbone of the app.