8

를 생성하는 Appledocs을 사용하여,하지만 난 Appledocs (https://github.com/tomaz/appledoc#quick-install)내가 내 질문의 단순함에 대해 사과 문서

를 사용하여 문서를 생성하려고했던 나는 그것을 설치하는 방법을 정확히 모르겠어요. 내가 할 방법은 다음과 같습니다 내가 github의의 REPO를 복제 한 후 터미널에서 스크립트 (I이 사용 appledocs은 --help 확인)를 설치하여 appledocs를 설치

  • .

    • 가 어떻게
    • 그것이 생성 된 문서 파일을 생성 않습니다

  • 그러나, 지금 내가 어떻게 실제로 내가 엑스 코드에서 내 프로젝트가 의미에서이 사용합니까?

답변

15

항상 나는 프로젝트에 문서를 생성 할 수있는 새로운 타겟을 추가합니다. 프로젝트 빌드 단계로 이동하여 '대상 추가'를 클릭하십시오. 기타에서 집계를 선택하고 이름을 지정하십시오 (예 : ProjectDocumentation).

아직 빌드 단계 탭에서 '빌드 단계 추가'로 이동하고 '실행 스크립트 추가'를 클릭하십시오. 이제 다음을 붙여 자신 만의 설정을 조정할 수 있습니다 : 내가 사용하는

/usr/local/bin/appledoc \ 
--project-name HereProjectName \ 
--project-company "HereProjectCompany" \ 
--company-id com.companyName \ 
--keep-undocumented-objects \ 
--keep-undocumented-members \ 
--search-undocumented-doc \ 
--exit-threshold 2 \ 
--ignore .m \ 
--output "AppleDoc" . 

을 무시 *하는 .m 난 단지 단지 내 헤더 파일에 문서를 쓰기 때문이다. 내 * .m 파일의 문서는 나 자신만을위한 것입니다. 이 대상을 빌드하면 문서가 XCode docset으로 생성됩니다. 클래스 이름을 alt 키를 클릭하여 액세스 할 수 있습니다. 주석 구문에 대해서는 AppleDoc website을 확인하십시오.

명령 줄 옵션에 대한 설명은 appledoc --help 명령을 확인하십시오.

+0

나는'--project-name'을 동적으로 만들었지 만, 다른 2 개의 필드에는 비슷한 변수를 찾을 수 없습니다.도움말 D : – Alexander

-1

권장되는 방법은 clone GitHub project and compile the tool from Xcod e입니다. GitHub 프로젝트를 복제하면 주요 저장소에 대한 링크가 만들어 지므로 향후 업그레이드도 크게 단순화됩니다. 설치하려면 터미널에 다음을 입력하십시오.

git clone git://github.com/tomaz/appledoc.git 

그러면 appledoc 디렉토리가 작성됩니다. 당신은 appledoc.xcodeproj Xcode 프로젝트를 찾을 수 있습니다; 그것을 열어서 appledoc 타겟을 컴파일하십시오 -이 작업은 기본적으로 이루어져야합니다. 그러나 시스템은 최소 시스템 요구 사항을 충족해야합니다 (아래 참조). 생성 된 appledoc 실행 파일을 빌드 디렉토리에서 경로 (echo $ PATH)에있는 디렉토리 중 하나로 복사하여 쉽게 액세스 할 수있게하는 것이 좋습니다.

선택 사항 : Appledoc은 자체 포함되어 있으며 필요한 템플릿 파일을 포함합니다. 당신이 예상 위치 중 하나에 템플릿 하위 디렉토리에서 이러한 기본을 수정할 경우 : 예를 들어 visit

+0

이 답변은 매우 유용하지는 않습니다. Asker는 이미 빠른 설치 가이드를 찾았습니다.이 내용은 복사하여 붙여 넣는 것 이상의 의미가 있습니다. – Connor

3

자세한 내용은

~/Library/Application Support/appledoc 
~/.appledoc 

, 다음과 같이, 그것은 latests에 대한 소스 코드 문서와 유효한 헤더입니다 Appledoc.

// 
// GSUserDefaults.h 
// 
// Created by Gabor Szabo on 30/01/2013. 
// 
// 

#import <Foundation/Foundation.h> 


/*! 
@discussion This class manages the user defaults on the device with some extra convenient methods. 

## Version information 

__Version__: 1.0 

__Found__: 2013-01-30 

__Last update__: 2013-01-30 

__Developer__: Gabor Szabo, TMTI Ltd. 

*/ 

#pragma mark - Interface 

@interface GSUserDefaults : NSObject { 

} 

#pragma mark - Class Methods 

#pragma mark - Getters 

/// @name Getter methods 

/*! 
@abstract Returns the value for the key. 
@discussion It reads the values from the `NSUserDefaults`. 
@param key The key, it must be not `nil`. 
@return The value object for the key. 
@exception NSException Thrown when the key is `nil`. 
@since 1.0+ 
*/ 
+ (id)valueForKey:(NSString *)key; 

/*! 
@abstract Returns a value collection for the keys. 
@discussion It reads the values from the `NSUserDefaults`. 
@param keys The set of keys, which are affected. 
@return The value collection for the desired keys. 
@exception NSException Thrown when the key is `nil`. 
@since 1.0+ 
*/ 
+ (NSDictionary *)valuesForKeys:(NSSet *)keys; 

#pragma mark - Setters 

/// @name Setter methods 

/*! 
@abstract Sets a value for the selected key. 
@discussion The value always will be overridden. It sets the value to the `NSUserDefaults`. 
@param value The value object, it can be `nil`, in case of `nil` the key will be removed from the `NSUserDefaults`. 
@param key The key for the value, it cannot be `nil`. 
@exception NSException Thrown when the key is `nil`. 
@since 1.0+ 
*/ 
+ (void)setValue:(id)value forKey:(NSString *)key; 

/*! 
@abstract Sets `nil` values for the selected keys. 
@discussion The value always will be overridden. It removs the from the `NSUserDefaults`. 
@param keys The set of keys, which are affected. 
@since 1.0+ 
*/ 
+ (void)setNilValueForKeys:(NSSet *)keys; 

/*! 
@abstract Sets a default value for the selected keys. 
@discussion It the key already exists, it won't be overridden, if the value was `nil` for the key, the key gets the value. It sets the values to the `NSUserDefaults`. 
@param defaultValue The value object, it could be `nil`, in case of the `nil` just nothing will happen, the keys won't be removed. 
@param keys The set of keys, which are affected. 
@since 1.0+ 
*/ 
+ (void)setDefaultValue:(id)defaultValue forKeys:(NSSet *)keys; 

/*! 
@abstract Sets the value for the selected keys. 
@discussion The values always will be overridden, if the value was `nil` for the key, the key gets the value. It sets the values to the `NSUserDefaults`. 
@param value The value object, it can be `nil`, in case of `nil` the key will be removed from the `NSUserDefaults`. 
@param keys The set of keys, which are affected. 
@since 1.0+ 
*/ 
+ (void)setValue:(id)value forKeys:(NSSet *)keys; 

@end 
+0

헤더 주석에 @property를 어떻게 문서화합니까? – kervich

+0

그 방법은 @interface의 경우와 완전히 동일합니다. – holex

관련 문제