How iOS knows what UIScrollView to use

这个是对automaticallyAdjustsScrollViewInsets和edgesForExtendedLayout的总结

iOS grabs the first subview in your viewcontroller's view, so the one at index 0, and if it's a subclass of UIScrollView then applies the explained properties to it.

就是说控制器的View第一个子视图是UIScrollView 或者UIScrollView的子类,比如UITableView,上面的属性将会起到应用,且navigationBar不隐藏的情况下。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容