UITableViewCell编辑减号框? [英] UITableViewCell Editing Minus Sign Frame?

查看:134
本文介绍了UITableViewCell编辑减号框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将减号移到右边。我该怎么办?

I want to move the minus sign to the right. How do I do that?

谢谢!

推荐答案

我不喜欢不知道是否可能,但我首先考虑继承 UITableViewCell 并覆盖其 layoutSubviews 方法。

I don't know if it's possible, but I'd start by looking into subclassing the UITableViewCell and overriding its layoutSubviews method.

但我不相信你可以,你只能访问 contentView accessoryView backgroundView ,而不是 deleteConfirmationView 。您可以在 UITableViewCell 的引用是布尔 showsDeleteConfirmation

But I don't believe you can, you only have access to the contentView, the accessoryView, the backgroundView, not the deleteConfirmationView. The closest thing you can find in UITableViewCell's reference is the boolean showingDeleteConfirmation.

所以你可以尝试继承 UITableViewCell ,并通过回复 willTransitionToState:来添加你想要的删除确认按钮。当新状态是 UITableViewCellStateShowingDeleteConfirmationMask

So you could try subclassing the UITableViewCelland adding your own delete confirmation button where you want, by responding to willTransitionToState: when the new state is UITableViewCellStateShowingDeleteConfirmationMask.

这篇关于UITableViewCell编辑减号框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆