Xcode 8 中的多行注释 [英] Multiple line comment in Xcode 8

查看:43
本文介绍了Xcode 8 中的多行注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚升级到 Xcode GM 8.0 并注意到 ⌘ +/没有注释掉选定的行.是否有另一个命令可以在 Xcode 8 中注释掉多行?

I just upgraded to Xcode GM 8.0 and noticed ⌘ + / is not commenting out selected lines. Is there another command to comment out multiple lines in Xcode 8?

推荐答案

在 Xcode7 及更早版本中,注释选项在编辑器 > 结构 > 注释选择中可用.在 Xcode 8 中,此选项被禁用.

In Xcode7 and earlier versions, the commenting option was available in Editor > Structure > Comment Selection. In Xcode 8 this option is disabled.

要启用这些选项,请运行 sudo/usr/libexec/xpccachectl 并重新启动 Mac.

To enable these options run sudo /usr/libexec/xpccachectl and restart your Mac.

Apple 开发者论坛上有关于此问题和几个可能的修复的线程.对我来说,运行上述命令并重新启动 Mac 即可解决问题.

There is thread on Apple Developer Forums regarding this issue and several possible fixes. For me running the above command and restarting the Mac did the fix.

也在 Xcode 8 发行说明中 它说:

要在 OS X 10.11 版上使用编辑器的注释/取消注释选择和添加文档命令以及其他已安装的 Xcode 扩展,请启动 Xcode 并安装其他系统组件,然后重新启动 Mac.(26106213)

To use the Editor's Comment/Uncomment Selection and Add Documentation commands—as well as other installed Xcode Extensions—on OS X version 10.11, launch Xcode and install additional system components, then restart your Mac. (26106213)

这篇关于Xcode 8 中的多行注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆