IOS9 new feature Keywords: can be used in properties, method return values, and parameters
The role of the keyword: prompt action, tell the developer property information
The purpose of the keyword: to cater to Swift,swift is a strong language, Swift must specify whether an object is empty
Keyword Benefits: Improve code planning and reduce communication costs
Keyword usage errors only report a warning and do not compile the error
Nullable:1. How to use (syntax) 2. When to use (function)
The role of nullable: May be empty
Nullable Syntax 1
@property (Nonatomic, strong nullable) NSString *name;
Nullable Syntax 2 * keyword variable name
@property (nonatomic, Strong) NSString * _nullable name;
Nullable Syntax 3
@propert (Noantomic, strong) NSString *_nullable name;
Nonnull cannot be empty;
Null_resettable:1. How to use (syntax) 2. When to use (function)
You must handle the empty case, overriding the Get method
null_resettable function: The Get method cannot return a nil set method that can be passed in as an empty
null_resettable syntax
@property (Nonatomic, Strong, null_resettable) NSString *name;
Common keywords for new features of IOS9