【问题标题】:ios iphone em protocol is not declaredios iphone em 协议未声明
【发布时间】:2014-01-29 08:04:18
【问题描述】:

我有这个在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

xcode 给了我这个错误:

【问题讨论】:

  • 就像JamesFrost 说停止从网站复制和粘贴 -1

标签: ios objective-c


【解决方案1】:

摆脱 HTML 标记:

@interface CountriesViewController : UITableViewController <CountryDetailsViewControllerDelegate>

【讨论】:

  • 而且在未来,不要在不了解其作用的情况下直接从网站复制和粘贴代码。
  • @JamesFrost 我很抱歉这样做
  • 为什么你的回答得到肯定票,而我的问题得到否定票?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-02-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多