-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.h
More file actions
30 lines (22 loc) · 936 Bytes
/
Person.h
File metadata and controls
30 lines (22 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// Person.h
// HelloWorld1
//
// Created by Eric Chee on 11/7/14.
// Copyright (c) 2014 Eric Chee. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSString *const kFirstNameKey; // allow other classes to read these constants
extern NSString *const kLastNameKey; // " "
@interface Person : NSObject
@property (nonatomic, strong) NSString *firstName;
@property (nonatomic, strong) NSString *lastName;
@property (nonatomic, strong) NSNumber *age;
- (BOOL) isEricInLoveWith:(NSString *)food
andAlso:(NSString *)drink;
+ (void) poop;
// For adding Subscripting Support
// so can set firstName & lastName quickly
- (id) objectForKeyedSubscript:(id<NSCopying>)paramKey; //called when prog provides key & wants to read value of that key
- (void) setObject:(id)paramObject forKeyedSubscript:(id<NSCopying>)paramKey; // when prog wants to set value of key
@end