更改宽度 table 视图单元格并为两个单元格使用一个图像
change the width table view cell and used one image for two cell
如何将单个图像用于如图所示的两个单元格
作为妥协,您可以放置 uibutton 而不是标签。 (在下图中你可以看到如何做到这一点)
在
中添加您的导航逻辑作为按钮的选择器
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
// Configure the cell...
// add action manually for your button
cell.FirstSegueButton addTarget:self action:@selector(FirstSegueButton:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
如何将单个图像用于如图所示的两个单元格
作为妥协,您可以放置 uibutton 而不是标签。 (在下图中你可以看到如何做到这一点)
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
// Configure the cell...
// add action manually for your button
cell.FirstSegueButton addTarget:self action:@selector(FirstSegueButton:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}