Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UITableView编辑模式删除按钮隐藏在IPhone 4s中_Ios_Swift_Uitableview - Fatal编程技术网

Ios UITableView编辑模式删除按钮隐藏在IPhone 4s中

Ios UITableView编辑模式删除按钮隐藏在IPhone 4s中,ios,swift,uitableview,Ios,Swift,Uitableview,删除按钮在较小分辨率下不完全可见 func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { return true } func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {

删除按钮在较小分辨率下不完全可见

func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
    return true
}

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
    if (editingStyle == UITableViewCellEditingStyle.delete) {
    }
}
下面是我的截图

更新1

tableview单元格约束的屏幕截图


好的,因此从您的注释来看,您的表视图没有正确地约束到视图。所以你的细胞“悬挂”在屏幕的右边缘

要解决这个问题,您应该在故事板中添加约束

选择表格视图并点击添加约束按钮。选择四条边并将0放入框中

然后点击“添加约束”,这将解决您遇到的问题

“添加约束”按钮在界面生成器屏幕的右下角看起来像一架星球大战Tie战斗机


它在更高分辨率下对您有效吗?@Bucket谢谢您的回复,是的,它在其他分辨率下有效。您可以尝试调试视图层次结构并找出问题所在。您是否检查了单元格的约束条件和大小?@Fogmeister谢谢您的回复,您的假设是正确的,文本正在滚动。现在我明白了问题所在。谢谢你的解释。