Xcode 注释工具的使用

 

1:Xcode 8之后

 

Goodbye World

In Xcode 8, Apple integrated a comment documentation generator plugin, which is built on top of VVDocumenter. Now this project is proud to be a part of Apple. It means you could just use the shortcut (⌥ Option + ⌘ Command + /) to add a documentation comment to your code if you are using Xcode 8 or above!

VVDocumenter is one of my hobby projects from 2013, back to the age of Xcode 4. It serves well for these years and I am so glad that it helps a lot of developers to improve their productivity. Since there is no need to install this plugin anymore, the development of VVDocumenter will not continue. Yes, it's time to say goodbye, with a happy ending.

Thank you all for your selfless support to this project. Let's build more great things and make the world better in future!

 

即,Xcode 8之后,无需使用注释插件VVDocumenter了,Xcode已经将其融合进去了

 

使用方法:option+command+/

 

 

 

2:Xcode 8之前

 

下载地址:https://github.com/onevcat/VVDocumenter-Xcode#goodbye-world

 

效果图

Objective-C效果图:
 
 
Swift 效果图
 

 

安装步骤如下:
 
一、查看Xcode的UUID
 
方式1
终端执行 defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
 

 

拷贝选中的字符串。
 
方式2
在应用程序目录中找到Xcode.app,右键”显示包内容”,进入Contents文件夹,双击Info.plist打开,找到DVTPlugInCompatibilityUUID,拷贝后面的字符串。
 
二、添加Xcode的UUID到VVDocumenter-Xcode的Info.plist文件
 
方式1--插件已经安装完成
1、打开 xcode插件所在的目录:~/Library/Application Support/Developer/Shared/Xcode/Plug-ins;
2、选择已经安装的插件例如VVDocumenter-Xcode,右键”显示包内容”;
3、找到info.plist 文件,找到DVTPlugInCompatibilityUUIDs的项目,添加一个Item,Value的值为之前Xcode的UUID,保存。

 

 
方式2--插件还未安装/重新安装
1、从GitHub克隆 仓库到本地,在Xcode中打开项目,选择 项目名称,在TAGETS下选中VVDocumenter-Xcode;

 

2、选择Info,找到DVTPlugInCompatibilityUUIDs的项目,添加一个Item,Value的值为之前Xcode的UUID;

 

3、Build项目,VVDocumenter-Xcode会自动安装。
 
三、重启Xcode
Xcode 6之后,重启Xcode时会提示“Load bundle”、 “Skip Bundle”,这里必须选择“Load bundle”,不然插件无法使用。

 

转载于:https://www.cnblogs.com/nelsen-chen/p/6222275.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值