为什么用户定义的单元格的 UITextField 和单元格视图之间有这么多控制器
我想在用户定义的单元格上获取 UITextField 的父视图。 我尝试过的只是调用 superview 方法,它返回 UIView,而不是我的单元格视图。 所以我多次调用了superview。
UITextField-> UIView-> UITableViewCellContentView ->; MyCellView
还有两个更意想不到的视图。这些是什么以及为什么?
添加描述。)我已经制作了自己的单元格,并且有一个 UITextField。
I'd like to get parent view of UITextField on my user defined cell.
What I've tried is just call superview method and it returns UIView, not a my cell view.
So I invoked superview several times.
UITextField -> UIView -> UITableViewCellContentView -> MyCellView
There're two more unexpected view. What are those and WHY?
add desc.) I've made my own cell and there's an UITextField.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UITableViewCell 有一个 contentView,其中添加了自定义视图。
您可以运行循环,直到获得 MyCellView
A UITableViewCell have a contentView where the custom view s are added.
you can run a loop until you get the MyCellView