iOS 布局

The update cycle is the point at which control returns to the main run loop after the app finishes running all your event handling code.

It’s at this point that the system begins updating layout, display, and constraints

Automatic refresh triggers

  • Resizing a view
  • Adding a subview
  • User scrolling a UIScrollView (layoutSubviews is called on the UIScrollView and its superview)
  • User rotating their device
  • Updating a view’s constraints
    However, there are ways to trigger layoutSubviews directly as well.
image.png
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • ViewsBecause view objects are the main way your applicati...
    梁光飞阅读 3,926评论 0 0
  • 观察:9点通知10点召开大公益YY讨论会,10点进YY发现只有几个人在YY、我观注了三十分钟,去忙手里的工作,11...
    陈诚chen阅读 1,243评论 0 0
  • 今天星期天,因想着能早点按时下班回家,故提前准备了饭菜,吃完饭和阿睿一起回咸宁,中途出门办点事,没带钥匙,等我回家...
    莫佩君阅读 2,047评论 0 0
  • 奇迹 1奇迹:今日功课分享《轻而易举的健康》第六天第六课,我今天活在欢笑中。 我感恩彼尚老师的灵性指引我轻而易举的...
    小龙女love阅读 1,711评论 0 0
  • 父亲的单位比较偏僻,从家出来需要换乘两次公交车,再走一段河滩公路,才能到达。下了公交车,穆茹拉着蝶儿穿过一道长长的...
    雨焉阅读 2,523评论 0 6

友情链接更多精彩内容