我有一個自定義的UITableViewController(「ChatView」),它有一個tableView的輸出。在界面生成器中,我將筆尖中的tableView連接到插座。當視圖加載我得到上述錯誤。該視圖通過一個tab控制器加載。加載了「ChatView」筆尖,但沒有得到UITableView。
我已經做了一些關於錯誤的研究,我似乎無法追查到這個問題。如果有人能讓我朝着正確的方向去解決這個問題,我將不勝感激。
@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
感謝
該視圖的控制器是UITableViewController的子類。在xcode中創建新的UIViewController類時,可以選擇子類UITableviewController。由於我的視圖包含UITableView,我認爲這是正確的做法。該模板生成了實現數據源和委託協議的方法。 – Nick 2011-04-24 20:43:50