开发者

Compiler Error in a Blank Project

I've started a new Navigation-based project in X-Code. I delete the default grid view, add a new blank view, and connect it to the File's Owner via ctrl+click+drag, and it builds fine, but before anything happens on the iPhone simulator or the real thing, I get "Thread 1: Program recieved signal: "SIGABRT"" when the program hits "[self.window makeKeyAndVisible]". I'm really new to Objective-C and X-Code, but I know quite a bit of C# and C++. I don't really understand if I've set something in the IDE wron开发者_如何学运维g, or what...any help would be greatly appreciated. Thanks!


When you create a new navigation project, the RootViewController class is a subclass of UITableViewController. Your error is due to removing the UITableView from the xib file, and replacing it with a UIView.

To fix this, you should change the super class of RootViewController to UIViewController. (Don't forget to remove the UITableView datasource and delegate methods from the implementation file for clarity.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜