尝试导入自定义UITableViewCell,它不断给我一个文件未找到词法预处理器错误.我无法弄清楚.
ProductCell.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
Run Code Online (Sandbox Code Playgroud)
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 …Run Code Online (Sandbox Code Playgroud) 开发ios应用程序.我有一个对象类Product.h和.m以及我的选择器类,它实现我的车辆选择以匹配产品到车辆.文件
product.h
#import <Foundation/Foundation.h>
@interface Product : NSObject {
}
@property (nonatomic, retain) NSString *iProductID;
@property (nonatomic, retain) NSString *vchProductCode;
@property (nonatomic, retain) NSString *vchPriceCode;
@property (nonatomic, retain) NSString *vchHitchUPC;
@property (nonatomic, retain) NSString *mHitchList;
@property (nonatomic, retain) NSString *mHitchMap;
@property (nonatomic, retain) NSString *fShippingWeight;
@property (nonatomic, retain) NSString *vchWC;
@property (nonatomic, retain) NSString *vchCapacity;
@property (nonatomic, retain) NSString *txtNote1;
@property (nonatomic, retain) NSString *txtNote2;
@property (nonatomic, retain) NSString *txtNote3;
@property (nonatomic, retain) NSString *txtNote4;
@property (nonatomic, retain) NSString *vchDrilling; …Run Code Online (Sandbox Code Playgroud)