我有一个关于用于编译的TableViewController类的问题,但不再存在。我很难过。这里使用Xcode 4.3和iOS 5.1是我的参与者:
在AllShitsTVC.h我有
` #import“CoreDataTableViewController.h” #import“Shift.h” #import“Delivery.h” #import“ShiftAddTVC.h” #import“ShiftTVC.h”
@interface AllShiftsTVC : CoreDataTableViewController <ShiftAddTVCDelegate, ShiftTVCDelegate>
@property (strong, nonatomic) NSFetchedResultsController *fetchedResultsController;
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, strong) UIManagedDocument *deliveryDatabase;
@property (nonatomic, strong) Shift *shift;
@property (strong, nonatomic) Shift *selectedShift;
@end
ShiftTVCDelegate收到错误: 找不到'ShiftTVCDelegate'的协议声明;你的意思是'ShiftAddTVCDelegate'吗?
ShiftTVC的相应界面是: #import“CoreDataTableViewController.h” #import“Shift.h” #import“Delivery.h” #import“AddEditDeliveryTVC.h”
@class ShiftTVC;
@protocol ShiftTVCDelegate <NSObject>
- (void)theDoneButtonOnTheShiftTVCWasTapped:(ShiftTVC *)controller;
@end
@interface ShiftTVC : UITableViewController <AddEditDeliveryTVCDelegate>
@property (nonatomic, weak) id <ShiftTVCDelegate> delegate;
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, strong) Shift *deliveries;
@property (strong, nonatomic) Shift *shift;
@property (weak, nonatomic) IBOutlet UITextField *shiftNameField;
@property (strong, nonatomic) Delivery *selectedDelivery;
- (IBAction)done:(id)sender;
@end
`
所以,我认为我已正确连接,正如我所提到的,这用于编译。
有人知道我错过了什么吗?