Min*_*ael 31 iphone uitableview ios
我需要更改当我尝试从UITableView后设置编辑中删除行时出现的默认删除按钮的标题YES.
Vla*_*mir 89
您可以在UITableView委托方法中更改它
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
Run Code Online (Sandbox Code Playgroud)
将此方法添加到您的UITableView委托(可能是您的视图控制器)中。
func tableView(_ tableView: UITableView, titleForDeleteConfirmationButtonForRowAtIndexPath indexPath: NSIndexPath) -> String? {
return "Erase"
}
Run Code Online (Sandbox Code Playgroud)
这会使按钮说“ Erase”(擦除),但是您可以使用所需的任何字符串。
我的完整答案在这里。
| 归档时间: |
|
| 查看次数: |
16193 次 |
| 最近记录: |