Вам нужно создать UIbutton
и jus addSubView
для cell
, это будет нормально работать.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UIImageView * accerTypeImage;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
UIButton *button = [[UIButton allo] init];
button.frame = //give the frame in UITableViewCell.
button.tag = indexPath.row;
[cell addSubView:button];
[button release];
return cell;
}