1、在使用xib或者storyboard进行视图创建的时候,需要把界面上的控件和关联的代码文件进行连线,快速打开代码文件快捷键

2、当一个函数或者其他代码段太长可以使用折叠功能
2.1 折叠指定代码段,在代码段的开始也就是 { 这个位置,把光标放这个位置然后点击(放开 +左键,折叠+右键)

2.2折叠整个类中的方法

2.2折叠整个类中的block

3、选中代码段,在代码段的开始也就是 { 这个位置,把光标放这个位置然后点击,这一个{}的代码就别选中了

4、在头文件(.h)和实现文件之间跳转(.m)

5、把代码定位到光标的位置(代码在光标的位置 然后滑动代码,这时候想要回到代码光标定位的位置)

6、跳转到代码定义的位置:光标定位到要查看定位的代码上(类似options + 鼠标左键)

7、在代码文件中快速打开自定义的代码段或者是在xib界面打开组件界面(就是我们UILable..),在xcode12 以前 这个视图是在右下角的,xcode12 收起来了 太不方便了

8、在xib也 点击控件 点击以下按钮可以显示到四个边的距离(布局),如果按了之后没有反应,可以移动一下鼠标就有了

网友评论