2011-02-23 3 views
5

사용자 지정 UITableViewCell을 가져 오려고하면 어휘 사전 처리기 오류가 발견되지 않습니다. 나는 그것을 이해할 수 없다.사용자 지정 UITableViewCell을 가져 오려고하면 Objective-C에서 어휘 사전 처리기 오류가 발견되지 않습니다.

ProductCell.h 내 UItableviewcontroller.h 파일에서

#import <UIKit/UIKit.h> 


@interface ProductCell : UITableViewCell { 
    IBOutlet UILabel *descript; 
    IBOutlet UILabel *productCode; 
    IBOutlet UIImageView *prodImage; 
} 

@property (nonatomic, retain) IBOutlet UILabel *descript; 
@property (nonatomic, retain) IBOutlet UILabel *productCode; 
@property (nonatomic, retain) IBOutlet UIImageView *prodImage; 

@end 

ProductCell.m

#import "ProductCell.h" 


@implementation ProductCell 

@synthesize descript; 
@synthesize productCode; 
@synthesize prodImage; 

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 
{ 
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 
    if (self) { 
     // Initialization code 
    } 
    return self; 
} 

- (void)setSelected:(BOOL)selected animated:(BOOL)animated 
{ 
    [super setSelected:selected animated:animated]; 

    // Configure the view for the selected state 
} 

- (void)dealloc 
{ 
    [super dealloc]; 
} 

@end 

나는 차이를 만들 것 같지 않습니다 @class로 가져하지 않는 시도했습니다. 내 구현 파일에서 간단히

#import "ProductCell.h" 

왜 그런가요? 기본적인 단계는 무엇입니까? 구현 파일에서 가져 오기를하면 내 문제가 해결됩니다. 시도한 청소 프로젝트

+0

실제 오류는 무엇입니까? –

+0

정확히 어떤 오류가 발생하고 있습니까? –

+1

또한 Xcode 4에서 이것이 나타나면 빌드시에 또는 실제로 인라인 오류 디스플레이에서이 오류가 실제로 발생합니까? 후자의 경우 알려진 문제이므로 Apple의 [개발자 포럼] (http://devforums.apple.com/)에서 논의해야합니다. –

답변

6

는 뭔가 다른 헤더 파일의 이름을 변경하고 다시 이름을 변경의 원래 이름이 나를 위해 문제를 해결했습니다.

관련 문제