내가 아이폰 4 응용 프로그램을 개발 그리고 난 클래스에 문제가 :유형 'shapeMatched'접근의 유형과 일치하지 않습니다 '는 setShapeMatched'
@interface Pattern : NSObject {
int maxNumShapes;
NSMutableArray* shapes;
NSMutableArray* shapeMatched;
CGSize bounds;
}
@property (nonatomic, retain, readonly) NSMutableArray* shapes;
@property (nonatomic, retain, readonly) NSMutableArray* shapeMatched;
...
- (void) setShapeMatched:(ShapeType)type;
@end
및 구현 :
- (void) setShapeMatched:(ShapeType)type {
int index = 0;
if (shapes != nil)
{
for(Object2D* obj in shapes)
{
if (obj.figure == type)
{
[shapeMatched replaceObjectAtIndex:index
withObject:[NSNumber numberWithBool:YES]];
obj.withFillColor = YES;
break;
}
else
index++;
}
}
}
나는 다음과 같은 경고 얻을 :
Type of property 'shapeMatched' does not match type of accessor 'setShapeMatched:'
가 어떻게이 경고를 해결할 수 있습니까?
"sidyll"에 먼저 응답해야하므로 실제로이 검사를해야합니다. – MusiGenesis