我在CountryDetailsViewController.h
@class CountryDetailsViewController;
@protocol CountryDetailsViewControllerDelegate <NSObject>
-(void) didCancel: (CountryDetailsViewController *) controller;
-(void) didDone: (CountryDetailsViewController *) controller;
@end
@interface CountryDetailsViewController : UITableViewController
@property (nonatomic, weak) id <CountryDetailsViewControllerDelegate> delegate;
-(IBAction)didCancel:(id)sender;
-(IBAction)didDone:(id)sender;
@end
在CountriesViewController
我有这个:
#import <UIKit/UIKit.h>
#import "CountryDetailsViewController.h"
@interface CountriesViewController : UITableViewController<em><CountryDetailsViewControllerDelegate></em>
@property (nonatomic, strong) NSMutableArray * _countires;
@end
答案 0 :(得分:4)
摆脱HTML标记:
@interface CountriesViewController : UITableViewController <CountryDetailsViewControllerDelegate>