Nullability Annotations

_Nullable -can have a nil value
-Nonnull -not expected to be nil

1
2
3
4
5
6
7
8
9
10
11
12
@interface Book : NSObject
 
@property (nonatomic, copy) NSString *title;
@property (nonatomic) Person *author;
@property (nonatomic) Person *editor;
@property (nonatomic) int yearOfPublication;
 
-(instancetype)initWithTitle:(NSString*)title
    author:(Person*)author
    year:(int)year;
 
@end