2012-10-24 3 views
1

README 파일에 따라 모든 것을 설치하고 필요한 모든 라이브러리를 가져 왔습니다. 이 방법을 구현할 때 여전히 : 내가 가진하지만이 누락 된 석영 라이브러리의 고장이라고,CorePlot의 ARC 문제

ARC Semantic issue - Receiver 'CPTTextLayer' for class message is a forward declarationARC Semantic issue - Receiver 'CPTTextLayer' for instance message is a forward declaration

나는 많은 게시물 읽기 :

- (CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index { 
    CPTMutableTextStyle *labelText = nil; 
    labelText= [[CPTMutableTextStyle alloc] init]; 
    labelText.color = [CPTColor grayColor]; 

    return [[CPTTextLayer alloc] initWithText:@"Test" style:labelText]; 
} 

을 나는 오류가 발생 프로젝트에 가져 와서 클래스에 포함 시켰습니다 : #import <QuartzCore/QuartzCore.h>.

내가 대신 nil을 반환하면 모든 것이 작동하지만이 데이터 라벨이 작동해야합니다.

누구나 작동 방식을 아는 사람이 있습니까?

+0

CPTTextLayer.h를 가져 왔습니까? – borrrden

+0

나는 기대하지 않았다 ** 그게 ** ... 왜 Xcode는 수입이 필요하다는 소리를 들었다. – Michal

+3

메시지를 이해하지 못했습니다. – borrrden

답변

1

일반적으로 forward class error은 현재 클래스에서 특정 클래스를 가져 오지 않고 .h 파일에서 @class을 선언 할 때 제공됩니다. @class도 없으면 보통 unknown type error이됩니다. 따라서이 설명에서 언급 한 바와 같이 CPTTextLayer에 대한 import 문이 누락 된 것이 분명합니다.

1

코드에 CPTTextLayer.h를 가져 오는 것을 잊었을 것이라고 생각합니다.