-
iOS 9新增關鍵字: 用于修飾屬性或者方法的參數、方法的返回值
-
nonnull
不可為空,等同于_Nonnull
和__nonnull
@property (nonatomic,strong,nonnull) UIView *view;
@property (nonatomic,strong) UIView *_Nonnull view;
@property (nonatomic,strong) UIView *__nonnull view;
-
nullable
可為空,等同于_Nullable
和__nullable
@property (nonatomic,strong, nullable) UIView *view;
@property (nonatomic,strong) UIView *_Nullable view;
@property (nonatomic,strong) UIView *__nullable view;
-
null_resettable
setter方法可傳空,getter方法不為空
-
_Null_unspecified
不確認是否為空
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。