Xcode 文檔註釋方法

摘自:http://www.cnblogs.com/bomo/p/4815963.htmlhtml

 

文檔註釋,能夠在調用時顯示註釋信息,讓調用者更好的理解方法的用途。this

註釋方法:atom

  • /// 註釋 和 /** 註釋 */  在調用時,Xcode能夠顯示註釋信息,注意 "/**" 是兩個"*", 一顆星註釋時,不能顯示提示。
  • 多行註釋,提示時只能顯示一行。
  • 在行尾註釋 須要加"<" 符號,不然不會顯示, 如:///< 註釋 或 /**< 註釋 */

下面幾種方式都是能夠的spa

@interface testClass : NSObject

/// property A is XXXX
@property (nonatomic) NSString *propertyA;
@property (nonatomic) NSString *propertyB; ///< property B is XXX;

/** property C is XXX */
@property (nonatomic) NSString *propertyC;
@property (nonatomic) NSString *propertyD; /**< property D is XXX */

/// this is a function ;
-(void) testFunA;

/** this is a function */
-(void) testFunB;

/**
 * this is a function 
 * param is a string
 * @param input  a string
 * @return  no return
 */
-(void) testFunC:(NSString *) input;
@end

@interface ASNavigationController : UINavigationController

@end

相關文章
相關標籤/搜索