Or *_*Ron 4 iphone uitableview
我正在我的应用程序中使用我创建的自定义单元格构建一个非常简单的UITable.目标语言是希伯来语.这就是为什么我的所有表格都从右到左.一切正常,直到我将表格更改为编辑模式.我成功取消了删除和红色配件按钮,因为在反对的方向,但细胞得到这个小的缩进到右边,我的细胞的一部分没有显示.
我试过返回NO; 到功能
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath (NSIndexPath *)indexPath
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
有什么建议 ?提前致谢
我刚试过这个,你的函数标题似乎是正确的(至少对于英文/从左到右).我确实在"shouldIndentWhileEditingRowAtIndexPath"和"(NSIndexPath*)indexPath"之间添加了冒号 - 请参阅下面的代码段.
// Override to prevent indentation of cells in editing mode (in theory)
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}
Run Code Online (Sandbox Code Playgroud)
我还使用下面的代码来停止插入/删除功能,并启用行可以移动(轻松关闭).
// Select the editing style of each cell
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
// Do not allow inserts / deletes
return UITableViewCellEditingStyleNone;
}
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the item to be re-orderable.
return YES;
}
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助.
| 归档时间: |
|
| 查看次数: |
4054 次 |
| 最近记录: |