[英]Xcode 5 gives error when run old projects
I have some problems when i am run any projects in Xcode 5 it gives error like 我在Xcode 5中运行任何项目时都会遇到一些问题,例如
Duplicate interface definition for class 'ViewController' 类“ ViewController”的重复接口定义
it is happen in most of situations if i download any project from git hub or from other sources. 如果我从git hub或其他来源下载任何项目,在大多数情况下都会发生。
But if i run that project in earlier version of Xcode than its working fine. 但是,如果我在Xcode的早期版本中运行该项目,而不是其正常运行。 I have tried to run it Xcode 4.6 . 我试过运行Xcode 4.6。
here is sample code that i run in Xcode 5 and gives error. 这是我在Xcode 5中运行并给出错误的示例代码 。
So whats problem with Xcode 5 ?? 那么Xcode 5有什么问题呢?
Solved: 解决了:
By some Mistake i have Change System Header file from UIKIT > UITableViewController.h
to 由于某些错误,我将系统标题文件从UIKIT > UITableViewController.h
更改为
NS_CLASS_AVAILABLE_IOS(2_0) @interface ViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
SO in any project if there is a viewcontroller named ViewController
it gives this error, 因此,在任何项目中,如果有一个名为ViewController
的viewcontroller都会出现此错误,
So i have look in old xcode and changed it to 所以我查看了旧的xcode并将其更改为
NS_CLASS_AVAILABLE_IOS(2_0) @interface UITableViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.