Xcode 5 - comment for documentation

New feature of Xcode 5. You can document your own code as like the below:

/*! Add new message between source to destination timeline as empty name string
 * \param sourceId Source timeline entity ID
 * \param destId Destination timeline entity ID
 * \returns A newly created message instance
 */
- (ISMessage*)messageFromTimeline:(NSInteger)sourceId toTimeline:(NSInteger)destId;

You can use Doxygen format for documentation. Then you can see the documentation of this function from Xcode 5 UI (by using Quick Help or Option-Click). 

Very easy! The following comment styles are also possible.

/** 
 * Add new message between source to destination timeline as empty name string
 * @author Wonil Kim
 *
 * @param sourceId Source timeline entity ID
 * @param destId Destination timeline entity ID
 * @return A newly created message instance
 */
- (ISMessage*)messageFromTimeline:(NSInteger)sourceId toTimeline:(NSInteger)destId;

/// Add new message between source to destination timeline
///
/// @param sourceId Source timeline entity ID
/// @param destId Destination timeline entity ID
/// @param name Message name
/// @return A newly created message instance
- (ISMessage*)messageFromTimeline:(NSInteger)sourceId toTimeline:(NSInteger)destId withName:(NSString*)name;

Property documentation is also possible.

/// Minimum height of entity for layout calculation

이 블로그의 인기 게시물

Wireless: HotSpot 2.0 이란?

Apple M1 Mac Mini에서 이더리움 (Ethereum) 채굴하기

Java: Java for Game? Java가 Game 개발에 어울릴까?