iOS-Xcode 取消黄色提示( _Nonnull....)
2016-11-29 本文已影响35人
Amuxiaomu
当我们在xcode中写一些方法的时候,总会有一些黄色提示出来,
对就是"Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)"
有个的页面方法比较多 那这么多提示看着就不舒服那怎么办呢
解决方法:
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_END
问题:

解决:

当然,这个不用每个方法都包 只要把开始 和 末尾包起来 中间的方法都不会有这种提示了
像这样:


包起来 中间的方法都不会提示了