[英]iOS TableViewCell lifecycle - set outlets
What TablleViewCell method is called once the outlets of a custom TableViewCell are set when the TableViewCell is instantiated from a storyboard? 从情节提要中实例化TableViewCell后,一旦设置了自定义TableViewCell的出口,便会调用哪种TablleViewCell方法? So a method similar to viewDidLoad essentially.
因此,本质上类似于viewDidLoad的方法。 I tried awakeFromNib but it appears that outlets aren't set there as I would expect.
我尝试了awakeFromNib,但似乎没有像我期望的那样设置插座。
It seems that 看起来
layoutSubviews
does the trick. 绝招。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.