本文介绍了无法在Xcode中拖动(生成代码段)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我按照所有说明(包括苹果的视频)拖动文本以在xcode中创建代码段时,我得到了不同的系统行为:我看到的只是选择ibeam ...我无法拖动。最终只是再次选择文本。我想念一些明显的苹果主义吗?
谢谢
When I follow all the instructions (including apple's video) to drag text to create a code snippet in xcode, I get a different system behavior: all I see is the selection ibeam... I can't drag. It just ends up selecting text again. Am i missing some obvious Apple-ism?Thanks
推荐答案
是的,我遇到了同样的问题,Apple-ism似乎是一个好词这个问题:)
Yes, I ran into the same problem, and Apple-ism seems to be a good term for this issue :)
它是这样工作的:
- 选择(或突出显示)您要转换为代码段的代码
- 编辑:在所选文本的任何部分上单击并按住一秒钟(例如2秒钟,有时8秒钟,不要拖动!)秒)
- 编辑:鼠标光标将更改图标(不是El Capitan上的图标)。
- 现在您可以将代码拖到摘要库中,绿色+图标将会出现。编辑:在El Capitan上不会出现绿色图标,但是代码段窗口的框架会变薄。
- Select (or highlight) the code your want to turn into a snippet
- Click and hold (do not drag!) on any part of the selected text for a short moment (like 2 seconds, sometimes 8 seconds)
- The mouse cursor will change icon (not on El Capitan).
- Now you can drag the code over the snippets library, where a green + icon will appear. On El Capitan the green icon does not appear, but the frame of the code snippets window will become thinner.
这篇关于无法在Xcode中拖动(生成代码段)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!