我目前正在学习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)