iOS-插件 VVDocumenter-Xcode


最近写代码时发现自己写的注释很乱,找了一下发现了这个Xcode的注释添加插件,它能够帮助我们快速添加标准化的注释,让代码看着更整洁
我才不会说是想偷懒


Objective-C效果图:


iOS-插件 VVDocumenter-Xcode_第1张图片

Swift效果图:


iOS-插件 VVDocumenter-Xcode_第2张图片

安装步骤

  • 下载VVDocumenter-Xcode
    github地址:https://github.com/onevcat/VVDocumenter-Xcode.git
    百度云:http://pan.baidu.com/s/1hsAqeKc

下载完成后运行一次项目,然后关掉项目


从Xcode 5开始,苹果要求加入UUID证书从而保证插件的稳定性。因此Xcode版本更新之后需要在VVDocumenter-Xcode的Info.plist文件中添加Xcode的UUID。

  • 查看Xcode的UUID,在终端执行命令:
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID

然后拷贝字符串

右键finder前往文件夹

iOS-插件 VVDocumenter-Xcode_第3张图片
  • 在弹出的框中输入路径:
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins
  • 右键文件显示包内容
  • 打开Contents目录下的Info.plist文件
  • 找到:DVTPlugInCompatibilityUUIDs,添加New item并将之前拷贝的字符串copy; 可以将其他的Item删除
  • 现在完全关闭Xcode ,再重启Xcode时会提示“Load bundle”、 “Skip Bundle”,这里必须选择“Load bundle”。
iOS-插件 VVDocumenter-Xcode_第4张图片

安装结束


  • 使用方法:
    在项目中需要添加注释的地方输入/// 就会出现相应的效果

你可能感兴趣的:(iOS-插件 VVDocumenter-Xcode)