How do you populate the Xcode 4 “Option+Click” popover?

前端 未结 2 544
野的像风
野的像风 2020-12-29 10:46

In Xcode 4, if you option + click on a keyword, then the said keyword will appear in a popover with a bunch of descriptive information, like so:

2条回答
  •  生来不讨喜
    2020-12-29 11:17

    As of Xcode 5.0, Doxygen and HeaderDoc formatting for variables and methods is automatically parsed and rendered in the Quick Help popover. More information about it here, but here's some key bits:

    /**
     * Add a data point to the data source.
     * (Removes the oldest data point if the data source contains kMaxDataPoints objects.)
     *
     * @param aDataPoint An instance of ABCDataPoint.
     * @return The oldest data point, if any.
     */
     - (ABCDataPoint *)addDataToDataSource:(ABCDataPoint *)aDataPoint;
    

    renders in Xcode as:

    As for properties, it's as easy as:

    /// Base64-encoded data.
    @property (nonatomic, strong) NSData *data;
    

    When option-clicked, this lovely popover appears:

提交回复
热议问题