我试图让我的按钮与我的自定义 uitableviewcell 的宽度和高度完全相同。
这是我正在尝试的方法
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
if (indexPath.row == 0) {
return cellCode;
}
if (indexPath.row == 1) {
cellManufacture.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cellManufacture;
}
if (indexPath.row == 2) {
cellModel.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cellModel;
}
if (indexPath.row == 3) {
cellYear.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cellYear;
}
}
submitButton.frame = cellSubmit.bounds; //<<<<<<HERE IS WHERE I SET SIZING :)
return cellSubmit;
}
然而这是我得到的结果......