iphone - objective-c ,iPhone开发中的 "Unexpected inter

我正在使用一个类 MapMultiController,它扩展了 UIViewController,并从我的 ListViewController 内部实例化,它也扩展了 UIViewController,如下所示:

@interface MapMultiController : UIViewController <UINavigationControllerDelegate, UINavigationBarDelegate> {
    MKMapView           *mapView;
    UISegmentedControl  *barStyleSegControl;
    bool                wasUpdated;
}

然后是:

MapMultiController *controller = [[MapMultiController alloc] initWithNibName:@"MapMultiController" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];
[controller release];

这一切之前都有效,但后来我从我的 ListViewController 中注释掉了分配和所有这些,并做了一些其他事情,现在当我试图把它放回去时,它说“意外的接口(interface)名称‘MapMultiController’ ",当然之后的一切都不起作用。

但在我看来一切都是正确的!怎么了?

最佳答案

可能发生的情况是,在您的编辑过程中,您在 @interface 之前添加了一些代码,现在编译器并不期望它在哪里找到它。不是你的代码错了,而是放错了地方。

关于iphone - objective-c ,iPhone开发中的 "Unexpected interface name"是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7375292/

相关文章:

svn - 颠覆(SVN)中的标签实际上是什么? SVN 内置了哪些标签工具? (与 Clearca

sql - LAST_VALUE() 行在无限制的前面和无限制的后面之间

iphone - 更改 UISwitch 的文本

oracle-sqldeveloper - 如何在 SQL 结果的输出中有颜色

oracle - PLS-00103 : Encountered the symbol "EXCEP

ruby-on-rails - 根据当前语言环境在 Rails 中显示小时格式(上午/下午或下午)

r - 使用 apply 和 rbind 构建 R data.frame

datetime - 如何从包含 PHP 日期时间值的字符串中获取时区?

netbeans - PhpStorm 中的多行移动和复制

haskell - truncate::(RealFrac a, Integral b) => a