Objective - C Basics Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

interpolate syntax

A

NSLog(@”%@ %@”, @”Ari”,@”Ingber”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

creating an integer variable

A

NSInteger b = 2;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

which has methods primitives or objects

A

objects only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

4 basic primatives

A

NSInteger
NSUInteger
CGFloat
BOOL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

comment styles

A

/* */ // //

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what to look for when confronted with incompatible integer to pointer conversion

A

extraneous *

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

NSInteger Format Specifier

A

%li

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

NSUInteger Format Specifier

A

%lu

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

CGFloat Format Specifier

A

%f or %.nf, where n is the number of decimal places to display

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

BOOL Format Specifier

A

%d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

syntax for calling a method and providing argument

A

ReturnType *captureVariable = [recipientObject methodNameArgument:argumentVariable];

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

xcode quick reference api

A

⇧⌘0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

create a simple string using the “string literal” syntax

A

NSString *welcome = @”Ari is you!”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

reserve capital case for

A

Class names

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

use camel case for

A

methods and variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

if statement syntax

A

if (condition is true) {
run this code
}

17
Q

syntax for creating empty mutable array

A

NSMutableArray *mEmpty = [[NSMutableArray alloc] init];

18
Q

syntax for creating array w/ fixed element (immutable)

A

NSArray *instructors = @[ @”Joe”, @”Tim”, @”Jim”, @”Tom”, @”Mark” ];

19
Q

4 elements of a method call (how to make a method call)

A

ReturnType *captureVariable = [recipientObject methodNameArgument:argumentVariable];

20
Q

define method

A

a method is a behavior that an object can perform upon itself.