TODOs in Xcode: How to make them stand out?

蹲街弑〆低调 提交于 2019-12-05 12:34:32

问题


I am aware of the method of making them warnings, but I want to keep my legit warnings separate from my todos. I'm also have yet to see xcode 4 highlight the todos like everyone seems to think it does. And xcode's todo support only works on todos outside of functions...

The build phase script that is outlined here is wonderful, but it makes the TODOs into warnings, and Objective C creates enough legitimate warnings that I don't want my todo's clogging up the list. Is there a way to make the todo's a different build result, like an info result or something? Something that will not make Xcode's real warnings (half of should be errors) vanish in the crowd?


回答1:


UPDATE

As of Xcode 4.4; FIXME:, ???:, ????:, !!!: all work outside of a function/method.

ORIGINAL ANSWER (< Xcode 4.4)

xcode will highlight a TODO but only outside of a function.

//TODO: This will show in function drop down 
-(void)method1
{
    //TODO: This will not show
}

In addition; FIXME, ???, ????, !!!! do the same.




回答2:


One way is to use Xcode's search feature. If you mark your code with // TODO:..., you can search the entire project for // TODO and generate a nice list of tasks.

Also, note that comments starting with // TODO: or // FIXME: that are outside the scope of any method will appear in the method popup menu, just like #pragma mark lines.



来源:https://stackoverflow.com/questions/9469412/todos-in-xcode-how-to-make-them-stand-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!