小编Q8i*_*Q8i的帖子

Objective-C方法描述(doc评论)

我目前正在学习Objective-C,需要知道如何编写方法描述.在Objective-C中学习如何做到这一点我遇到了很多困难.

在Jave,我们有这个

/**
< h2 >MethodName</ h2 >
< p >Various Description, can use html with images etc.</ p >
*/
private void methodName(args[]..)
{

} 
Run Code Online (Sandbox Code Playgroud)

在objective-c中,我在哪里放置描述?这也是在头文件或实现文件中?

//Within Implementation?
- (float)gteHeightPercentage:(float)percentageToGet
{
    return self.view.bounds.size.height * percentageToGet;
}

//Within Header?
- (float)getWidthPercentage:(float)percentageToGet;
Run Code Online (Sandbox Code Playgroud)

documentation xcode comments objective-c

21
推荐指数
2
解决办法
2万
查看次数

标签 统计

comments ×1

documentation ×1

objective-c ×1

xcode ×1