Swift: #warning equivalent

前端 未结 14 1617
無奈伤痛
無奈伤痛 2020-11-28 18:52

Does Swift have a #warning equivalent? It\'s simply used to show a warning in Xcode\'s own GUI

I\'m also interested in whether there\'s a #error equivalent.

14条回答
  •  一整个雨季
    2020-11-28 19:22

    I may be late to the party with Xcode 10 supporting errors and warnings, but simply putting a String:

    "Need to finish implementing this"
    

    will produce a warning: String literal is unused with autocompletion still working and the project still compiling.

提交回复
热议问题