Objective-C Code Flashcards
0
Q
self.cards[index]
A
[self.cards objectAtIndexedSubscript]
1
Q
@property(copy) NSString *title;
A
- (NSString *)title;
- (void)setTitle:(NSString *)newTitle;
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.
3
Q
@property (readonly)
A
Getter only; no setter or assignment via dot-notation