Uitableview 把你的按钮排成一行容易吗?

Uitableview 把你的按钮排成一行容易吗?,uitableview,uibutton,Uitableview,Uibutton,在UITableViewCell中将UIButtons对齐,而不计算用于设置帧宽度的像素,这是一种简单的方法吗?就像下面那样。图片来自苹果邮箱 这真的很容易。我所需要的全部都是使用sizeWithFont方法,如下所示- CGSize size = [@"Conditions" sizeWithFont:[UIFont fontWithName:@"Helvetica-Bold" size:16] constrainedToSize:CGSizeMake(200, 21) lineBreakMo

在UITableViewCell中将UIButtons对齐,而不计算用于设置帧宽度的像素,这是一种简单的方法吗?就像下面那样。图片来自苹果邮箱


这真的很容易。我所需要的全部都是使用sizeWithFont方法,如下所示-

CGSize size = [@"Conditions" sizeWithFont:[UIFont fontWithName:@"Helvetica-Bold" size:16] constrainedToSize:CGSizeMake(200, 21) lineBreakMode:NSLineBreakByCharWrapping];