更新完XCode 难免遇到一些新的东西:

scrollView 新增 Content Layout Guide,导致这样使用xib(如下图)的玩家一直报错:

这里简单介绍两个小技巧:
1.Add New Constraints 这个快捷按钮 最主要的作用 也是刚使用xib 最常用的按钮,作用于选中视图的依赖
添加(依赖的添加 一般基于 父视图 或者 兄弟视图)
直接进入重点:
scrollView 多了一个 Content Layout Guide,以前设置依赖默认是设置给Content Layout的,现在分为了Frame 和 Content 两个依赖,默认快捷依赖作用于Frame上面,所以需要特殊操作,ctrl + 拖动 设置到content 上面。

2.ctrl 鼠标 拖动 视图 到 目标视图。

小惊喜:xib 组件添加快捷查询 图片资源(也回来了) 颜色(还没用过)

网友评论