How to View Comments in the Method Navigator of Xcode 4?
Does anyone know how to view comments in the method navigator in Xcode 4
In Xcode 3 these would put comments like:
???: Huh?
!!!: Woah
MARK: A开发者_StackOverflowliens
TODO: Fix this
in here...
You can still use // ???:, // FIXME: and // TODO: comments outside of methods to get the comment to pop up in the method navigator.
I know that some people would like these type of comments within methods to still show up in the method navigator and that there is a bug report filed against this, but I actually like this bug, as it forces me to keep my methods clean. I find that putting the // TODO:, etc., above the method creates better code readability.
Just my opinion.
You can even to that in one line (comment and separator):
so instead of:
#pragma mark -
#pragma mark MyCoolMethod
Just type as below:
#pragma mark - MyCoolMethod
- (void) myCoolMethod {
//Code here...
}
use the following:
#pragma mark your_comment_here
You can also use the following to add separator lines:
#pragma mark -
精彩评论