2
如何将两个按钮放置在一个UITableViewCell中,就像Apple App Store中的这个示例一样?一个UITableViewCell中的两个按钮
如何将两个按钮放置在一个UITableViewCell中,就像Apple App Store中的这个示例一样?一个UITableViewCell中的两个按钮
if ([cell.contentView viewWithTag:kButtonTag] == nil) {
UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
btn1.tag = kButtonTag;
UIButton *btn2 = btn1;
[btn1 setTitle:@"Tell a Friend" forState:UIControlStateNormal];
[btn2 setTitle:@"Report a Problem" forState:UIControlStateNormal];
btn1.frame = CGRectMake(0, 0,100,40);
btn2.frame = CGRectMake(120, 0,100, 40);
[cell.contentView addSubview:btn1];
[cell.contentView addSubview:btn2];
[cell setBackgroundColor:[UIColor clearColor]];
}
改变周围的边框,而且它看起来类似。