我有一個具有兩個不同自定義表格單元格的UITableView。我啓動應用程序後,第一個單元格顯示正常。第二個單元格將在您點擊它們時出現。可摺疊單元格
任何人都可以幫助我或有想法嗎?
非常感謝。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *MyIdentifier = @"customCell2";
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if(cell == nil){
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
cell.backgroundColor = [UIColor clearColor];
cell.textLabel.backgroundColor = [UIColor clearColor];
cell.textLabel.textColor = [UIColor grayColor];
cell.textLabel.font = [UIFont fontWithName:@"STHeitiSC-Light" size:9.0];
}
return cell;
}
你怎麼能點擊它後,如果還沒有出現一個細胞出現?什麼是用戶點擊使一個單元格出現? – user2320861