static NSString *cellIdentifier = @"cell";
if (tableView ==tableview1)
{
ContactCustom *cell1=(ContactCustom *) [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell1 == nil)
{
[[NSBundle mainBundle] loadNibNamed:@"ContactCustom" owner:self options:nil];
cell1 = contactCustom;
}
}
如何在撥打cellForRowAtIndex
方法之前在viewDidLoad
方法中註冊筆尖名稱?爲tableView註冊筆尖名稱
越來越無法識別的選擇發送到實例錯誤 – user2134883 2013-03-12 12:26:50
你檢查xib與類正確連接,標識符爲p roper set in xib and use below code cell = [tableview dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath]; – Wish 2013-03-12 12:36:28
它應該是ContactCustom類中的Identifier屬性中的單元格 – user2134883 2013-03-12 12:43:39