9.5 【必学技巧 05】阅读源码的六种方法 ===================================== |image0| 在你使用一个模块的函数时,如果想查看这个函数的源码,有两个思路 第一个思路 ---------- 进入函数声明的位置,就可以看到源码了。 对应的快捷键有如下四组: 1. ⌘ + B:Go to Declaration or Usages 2. F4:Jump to Source 3. ⌘ + ⌥ + B :Go to Implementation(s) 4. ⌘ + 鼠标左键 5. ^ + ⇧ + B:跳转到类型声明处 第二个思路 ---------- 在当前页面弹出一个小窗口,直接显示 源代码,不用像上面一样跳转到另外一个页面。 快捷键是:⌘ + ⇧ + I |image1| -------------- |image2| .. |image0| image:: http://image.iswbm.com/20200804124133.png .. |image1| image:: http://image.iswbm.com/20190507153847.png .. |image2| image:: https://open.weixin.qq.com/qr/code?username=idealyard