所以我發現了很多問題和在這個問題上的答案,但我似乎仍然不能解決我的問題。 我有這樣的:在一個視圖控制器中的兩個UITableView的
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if(tableView == self.moduleTableView){
UITableViewCell *cell = [_moduleTableView dequeueReusableCellWithIdentifier:@"TableIDCell"];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"TableIDCell"];
}
這就是所有罰款和工程爲moduleTableView
,我有代碼來填充單個細胞。 但是,我後來有一個if(tableView == theOtherTableview)
和代碼永遠不會執行,(已使用斷點檢查)。因此,第二個tableview不會加載和填充。 我已經爲同做,如果在numberOfRows
方法,說明我宣佈:
self.tblEvents.delegate = self;
self.tblEvents.dataSource = self;
self.otherTblEvents.delegate = self;
self.otherTblEvents.dataSource = self;
,它仍然無法正常工作,我失去了什麼?我想我已經正確鏈接落實到故事板,我只是不能讓它重新加載cellForRowAtIndexPath:
方法而(tableView == OtherTableView)
感謝
檢查其他TableView的委託設置.... – Damo 2015-02-11 14:51:54