当我按下编辑按钮时,如何淡出单元格上的文本?
我想让单元格上的文本标签在按下按钮时淡出。 我尝试指向我想要淡出的标签,但它只适用于最后一个单元格。
我发现 -(void) willTransitionToState:(UITableViewCellStateMask)状态 是解决这个问题的方法,但我不知道如何使用。 我是否需要创建一个新类作为 UITableViewCell 类的子类?
任何帮助将不胜感激。谢谢你!
I would like to make my text label on a cell fade out when I press a button.
I tried pointing the label I want to make fade out, but it just work for only last cell.
And I found out that
-(void) willTransitionToState:(UITableViewCellStateMask)state
is the way to solve this problem, but I don't know how to use.
Do I need to make a new class that is subclass of UITableViewCell class?
Any help will be appreciated. Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您尝试过使用 UIView 的动画吗?
那会是这样的:
Have you tried using UIView's animations?
That would be something like this: