Swift: #warning equivalent

前端 未结 14 1661
無奈伤痛
無奈伤痛 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:23

    My answer is not quite satisfy your question, but if you want something easy you can use this plugin of alcatraz which works in all the projects without any additional preparations. Just do the following:

    1) install Alcatraz (Nice package manager for Xcode Plug-ins) by entering this line in terminal: 
    curl -fsSL https://raw.githubusercontent.com/supermarin/Alcatraz/deploy/Scripts/install.sh | sh
    2) Then restart Xcode and on it launch agree to install all bundles not included in Xcode
    3) In Xcode select menu item -> Window -> Package manager -> type in search panel XTodo and press install
    4) Relaunch Xcode and again agree to install additional bundles
    5) From now press Ctrl + T and you will see all Tags in nice window
    

    It also has preferences for adding new tags

提交回复
热议问题