码迷,mamicode.com
首页 > 其他好文 > 详细

什么时候layoutSubview会被调用

时间:2014-09-09 22:57:19      阅读:305      评论:0      收藏:0      [点我收藏+]

标签:style   color   ar   sp   on   c   ad   size   res   

文档描述不够详细,有人测试结果如下:

  • init does not cause layoutSubviews to be called (duh)
  • addSubview causes layoutSubviews to be called on the view being added, the view it’s being added to (target view), and all the subviews of the target
  • view setFrame intelligently calls layoutSubviews on the view having its frame set only if the size parameter of the frame is different
  • scrolling a UIScrollView causes layoutSubviews to be called on the scrollView, and its superview
  • rotating a device only calls layoutSubview on the parent view (the responding viewControllers primary view)
  • Resizing a view will call layoutSubviews on its superview

什么时候layoutSubview会被调用

标签:style   color   ar   sp   on   c   ad   size   res   

原文地址:http://www.cnblogs.com/walkerwang/p/3963450.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!