Objective-C Code Flashcards

0
Q

self.cards[index]

A

[self.cards objectAtIndexedSubscript]

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

@property(copy) NSString *title;

A
  • (NSString *)title;

- (void)setTitle:(NSString *)newTitle;

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

SEL someMethod = @selector(sayHello);

A

SEL - Selectors are Obj-C’s internal representation of method names. This stores a method called sayHello in someMethod that could be used to dynamically call a method at runtime.

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

@property (readonly)

A

Getter only; no setter or assignment via dot-notation

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