用于UITableViewCell的viewDidAppear [英] viewDidAppear for UITableViewCell

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

问题描述

我通常使用 viewDidAppear 方法在视图完成后出现在视图上做一些UI的东西我在各种情况下使用这个方法它是非常有用的,但是,我在完成出现后,需要在 UITableViewCell 上进行一些UI更改,SDK中是否有任何可用的方法执行类似的工作,如 viewDidAppear 但是对于 UITableViewCell

I usually use viewDidAppear method to do some UI stuff on the view after it finished appearing and I used this method in various situations were it was very useful, however, I need to do some UI changes on a UITableViewCell after it finished appearing, is there any available method in the SDK that does a similar job like viewDidAppear but for UITableViewCell ?

ps willDisplayCell 在我的情况下不起作用,我需要类似 didDisplayCell 的内容,如果确实存在的话。

p.s. willDisplayCell did not work in my case, I need something like didDisplayCell if it really exists.

推荐答案

UITableViewDelegate 具有以下功能:

func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)

func tableView(_ tableView: UITableView, didEndDisplaying cell: UITableViewCell, forRowAt indexPath: IndexPath)

单元格本身没有回调。

The cell itself does not have callbacks for this.

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

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