0

我有一个关于曾经编译但不再编译的 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;

@结尾

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

`

所以,我认为我已经正确连接了它,正如我所提到的,它曾经用于编译。

有谁知道我错过了什么?

4

0 回答 0