在编辑模式下更改UITableView中减号的位置 [英] Changing the location of the minus sign in UITableView in Edit mode
本文介绍了在编辑模式下更改UITableView中减号的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将减号图像的位置从单元格的左侧更改为中间.在这里尝试阅读: http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/ManageInsertDeleteRow/ManageInsertDeleteRow.html ,但找不到简单的方法.
I want to change the location of the minus image from the left side of the cell to the middle of it. Tried reading here: http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/ManageInsertDeleteRow/ManageInsertDeleteRow.html but couldn't find an easy way for doing that.
谢谢
推荐答案
在您的自定义单元格layoutSubviews方法中,使用:
In your custom cell layoutSubviews method use:
if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellEditControl"]) {
CGRect newFrame = subview.frame;
//Use your desired x value
newFrame.origin.x = 280;
subview.frame = newFrame;
}
如此处所示 https://stackoverflow.com/a/8512461/1747635 .
这篇关于在编辑模式下更改UITableView中减号的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文