-
iOS 9新增关键字: 用于修饰属性或者方法的参数、方法的返回值
-
nonnull
不可为空,等同于_Nonnull
和__nonnull
- e.g.
-
@property (nonatomic,strong,nonnull) UIView *view;
@property (nonatomic,strong) UIView *_Nonnull view;
@property (nonatomic,strong) UIView *__nonnull view;
-
nullable
可为空,等同于_Nullable
和__nullable
- e.g.
@property (nonatomic,strong, nullable) UIView *view;
@property (nonatomic,strong) UIView *_Nullable view;
@property (nonatomic,strong) UIView *__nullable view;
-
null_resettable
setter方法可传空,getter方法不为空 -
_Null_unspecified
不确认是否为空