Create a docstring for listing for Xcode 5 Quick H⁣elp

I want to document the listing in Xcode 5 so that I can see my documentation as a Quick Help in an autocomplete popup. For example, if I do this:

//! Better than a normal int!
typedef int superint;

then I can print superiand the popup will display superint, and at the bottom of the popup is shown “Better than a regular int!”.

I cannot figure out how to make this work for an enumeration. My listing is as follows:

typedef enum: unsigned int {
    a = 1,
    b = 2,
    c = 3,
} abc_t;

Turning a string //!(or ///or /**) in this case does not work. I type "abc_" and the completion appears in a popup window, but there is no docstring at the bottom below.

, Apple NS_ENUM() , //! , typedef NS_ENUM(...) { ... } .

Foundation , , , - . , NSXMLParserError , ( "NSXMLParserE" ), NSXmlParser.h // . docstring .

+4
2

, :

typedef enum: unsigned int {
    //! First letter
    ABC_A = 1,
    //! Second letter
    ABC_B = 2,
    //! Third letter
    ABC_C = 3,
}
//! Now I know my ABC's.
abc_t;

, docstring , .

+1

NS_ENUM . - , , , Xcode 6 , @abstract , @field

/*!
@abstract NSUInteger typedef to simplify stuff.
@field EnvironmentNumberMIN one.
*/
typedef NS_ENUM(NSUInteger, EnvironmentNumber) {
/// Lower floor. Use for validation.
EnvironmentNumberMIN    = 0,
....

, , NS_ENUM

0

All Articles