消除nonnull警告

https://stackoverflow.com/questions/32539285/pointer-is-missing-a-nullability-type-specifier

 

To disable this warning across your entire project

  1. Go to Build Settings

  2. Make sure you are viewing the "All" tab not "Basic" or "Customized"

  3. Search for the field Other Warning Flags.

  4. Add the following flag: -Wno-nullability-completeness

  5. Now clean and build (⇧⌘K then ⌘R)

  6. Quit Xcode and re-open it (Don't skip this step!)

    Note: It can take a few seconds for the warnings to go away even after you finish building and relaunching Xcode, for me it takes about 15 seconds for Xcode to fully update.

share   improve this answer   

猜你喜欢

转载自www.cnblogs.com/yuxiaoyiyou/p/13371713.html
今日推荐