Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
In my code, I override UIView's removeFromSuperview method. Now, I'd like to make some changes so that when I'm sending the removeFromSuperview message to an instance of this UIView subclass, I can see my own explanation of what the method does, rather than Apple's explanation.

Please feel free to ask for clarification. I didn't get enough sleep last night.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,560
6,059
I'm pretty sure all you need to do is add some specially formatted comments to your method declaration. You can look at any of the SDK header files to see what they look like. They're inspired by Java's Javadoc comments - in a lot of cases the two are identical.

Note that I've never actually bothered with having such polished documentation for Obj-C code. If it doesn't appear in Xcode, there may be a command line tool you need to use which will produce actual documentation libraries using your specially formatted comments in your code and load them into Xcode.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,750
8,422
A sea of green
Thanks, but that's not what I was looking for. Because I am simply overriding an Apple-provided method, I'd rather not declare the method in my subclass's header file.

I would. I'd redeclare it with a comment that said "override". Think of it as compiler-checked documentation of programmer intent.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.