gpt4 book ai didi

ios - 在编辑模式下更改 UITableView 中减号的位置

转载 作者:行者123 更新时间:2023-11-29 04:05:51 24 4
gpt4 key购买 nike

我想将负图像的位置从单元格的左侧更改为单元格的中间。尝试在这里阅读:http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/ManageInsertDeleteRow/ManageInsertDeleteRow.html但找不到一种简单的方法来做到这一点。

谢谢

最佳答案

在自定义单元格布局Subviews 方法中使用:

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 .

关于ios - 在编辑模式下更改 UITableView 中减号的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15246738/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com