加载“ChatView” nib但没有得到一个UITableView。 [英] loaded the "ChatView" nib but didn't get a UITableView.'

查看:90
本文介绍了加载“ChatView” nib但没有得到一个UITableView。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义UITableViewController(ChatView),它有一个tableView的输出。在界面构建器中,我已经将tableView中的tableView连接到了outlet。当视图加载我得到以上错误。视图通过标签控制器加载。

I have a custom UITableViewController ("ChatView") that has an Output for a tableView. In the interface builder I have connected the tableView in the nib to the outlet. When the view loads I get the above error. The view is loaded via a tabcontroller.

我对错误做了一些研究,我似乎无法跟踪问题。如果有人可以让我朝着正确的方向解决这个问题,我会感激。

I have done some research about the error and I can't seem to track down the issue. I would appreciate if someone could get me going in the right direction to resolve this.

@interface ChatViewController : UITableViewController
<UITableViewDelegate, UITableViewDataSource> {

    NSMutableArray *chatMessages;
    IBOutlet UITableView *chatTable;
    IBOutlet UITextField *chatText;


}

@property(nonatomic, retain) IBOutlet UITextField *chatText;
@property (nonatomic, retain) IBOutlet  UITableView *chatTable;
@property (nonatomic, retain) NSMutableArray *chatMessages;


-(IBAction)sendPressed;


@end

感谢

推荐答案

有类似的问题。运行时转储说:

Had a similar problem. The runtime dump was saying:


加载nib但没有获得UITableView

loaded nib but didn't get a UITableView

我在故事板上挂了一切。我有一个viewController作为主类,并有一个自定义单元格内部的UITableView对象。

I had hooked up everything fine on the storyboard. I had a viewController as the main class and had a UITableView object with a custom cell inside.

但是,问题是,我的自定义类有 a UITableView代替:

However, the problem was that my custom class had 'somehow' ended up being a UITableView instead of this:

@interface iPadDetailViewController : UIViewController <UITableViewDelegate> {
    IBOutlet UITableView *tableBox;
}

一旦我设法匹配故事板类型与自定义类类型所有罚款。

Once I managed to match up the storyboard type with the custom class type it was all fine.

故事,xCode和编译器的道德通常是正确的。检查您的课程是否匹配。

The moral of the story, xCode and the compiler is usually right. Check your classes match.

这篇关于加载“ChatView” nib但没有得到一个UITableView。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆