草庐IT

continuebtn

全部标签

ios - 如何在 UITableView Cell 中以编程方式创建 n 个 UIButton?

我正在尝试创建一个带有n个按钮的UITableView,具体取决于后端JSON数据。我附上了一张图片,我知道如何在UITableViewCell上创建UIButton,但我不知道如何将它们正确放置在UITableViewCell中。UIButtonUITableViewCellUIButton*continuebtn=[[UIButtonalloc]initWithFrame:CGRectMake(10,100,view1.frame.size.width-20,40)];[continuebtnsetBackgroundColor:[UIColorgrayColor]];[conti