これは簡単な質問ですが、わかりにくいです。私はオブジェクトのプロパティを作成しようとしているので、prepareForSegueの実行中にそのオブジェクトが委譲されていることを伝えることができます。私はプロトコルでこれを行うことができることを知っていますが、私はこのケースでは直接的なアプローチが最も簡単だと考えました。残念ながら、コンパイルエラーに次のコードの結果:私はプロパティ宣言を入力するとデリゲートプロパティを宣言したときのエラー
#import <UIKit/UIKit.h>
#import "PlanningViewController.h"
@interface DepartmentViewController : UITableViewController
@property (nonatomic, weak) PlanningViewController *planningDelegate;
@end
、XcodeはPlanningViewControllerを認識しても、私はちょうどタブを通じてへのテキストを表示します。コンパイラは、しかし、文句を言う:
Unknown type name 'PlanningViewController': did you mean 'UISplitViewController'?
私は間違っている?
#import <UIKit/UIKit.h>
#import "DepartmentViewController.h"
@interface PlanningViewController : UITableViewController
// Table cell connections
- (IBAction)addItemPressed:(id)sender;
@end
'PlanningViewController.h'の内容を表示してください。 – trojanfoe