如何在 ios 的编辑模式下对单元格上的文本进行动画处理
我有自定义表格单元格,单元格的左右角有两个标签。
现在,当我进入编辑模式时,众所周知,单元格向右移动,因此右侧标签上的文本也向右移动,并且它将变得不可见。
但我想要的是它应该在编辑模式下为自己设置动画,类似于邮件应用程序在编辑模式下的操作,其中文本会移动并且仍然可见。
请帮我解决这个问题。
I have custom table cell with two labels on left and right corner of the cell.
Now when I enter edit mode, as we all know, the cell shifts towards right, so my text on right label also shifts to right and it will become invisible.
But what I want is that it should animate itself in edit mode, similar to what the mail application does in edit mode, where the text shifts and will still be visible.
Please help me out in solving this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您的标签是这些单元格的 contentView 的子视图。
来自
UITableViewCell类参考
还要确保整个单元格内容(标签,视图,控件)的
autoresizingMask
设置正确以适应布局的变化- 例如UIViewAutoresizingFlexibleWidth
Make sure your labels are subviews of the contentView of those cells.
From
UITableViewCell Class Reference
Also make sure the
autoresizingMask
of the entire cell content (labels, views, controls) is setup correctly to adapt to changes in layout - e.g.UIViewAutoresizingFlexibleWidth