iOS代码对齐 ---XAlign

news/2024/7/20 21:07:54 标签: ios

https://github.com/qfish/XAlign

配置好Cocoapods

Install & Update

Via source

Clone this repo

Then build the XAlign target in the Xcode project and the plug-in will automatically be installed in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins

Restart Xcode.

Via command-line

curl -fsSL http://qfi.sh/XAlign/build/install.sh | sh

Manually

Download this package XAlign.tar.gz

Unpack it, copy or move the XAlign.xcplugin to the following path:

~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/

Tips: To quickly go to Finder type Shift + Cmd + G. If there is no Plug-ins directory, you should make one.

Restart Xcode.

Uninstall

curl -fsSL http://qfi.sh/XAlign/build/uninstall.sh | sh

or Delete the following directory:

~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XAlign.xcplugin

Usage

In Xcode

Xcode -> Edit -> XAlign

Auto Align Shortcut (default)

Shift + Cmd + X

You can choose the shortcut in the Settings panel, Xcode -> Edit -> XAlign -> Setting.
Trouble-Shooting

wiki

New version Xcode ? Try this in your terminal :

Get current Xcode UUID

XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`

Write it into the Plug-ins's plist

for f in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*; do defaults write "$f/Contents/Info" DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID; done

Restart your Xcode, and select Load Bundles on the alert

http://www.niftyadmin.cn/n/1557808.html

相关文章

React项目: Cannot find module '@babel/plugin-transform-react-jsx-source'

1. 进入项目根目录2. rm -rf node_modules3. npm install (不要使用 yarn )npm run start success

编程-Byte order Bit order

https://mp.weixin.qq.com/s/B9rKps4YsLiDTBkRks8rmQ 看到比特序和字节序放在一起被提及,想必就已经填补了概念拼图里面缺失的那一块了,这一块正是比特序。 一直以来,接触到最多的就是字节序: 大端字节序:big-endian b…

js(Es6)面试题总结

Es6 面试 Let 有块级作用域 不存在变量声明提前 不允许重复声明 声明的全局变量不会挂在到window上 const 声明一个只读的常量。一旦声明,常量的值就不能改变 有块级作用域 不存在变量声明提前 不允许重复声明 声明的全局变量不会挂在到window上 解构 从数…

linux:yum和apt-get的区别

2019独角兽企业重金招聘Python工程师标准>>> 一般来说著名的linux系统基本上分两大类: 1.RedHat系列:Redhat、Centos、Fedora等 2.Debian系列:Debian、Ubuntu等 RedHat 系列 1 常见的安装包格式 rpm包,安装rpm包的命令是“rpm…

微信小程序 初始化进入首页时 onShow加载两次解决方法

问题说明: 进入首页时,在onShow中发起请求加载数据,发现方法被调用了两次: 解决: 1、data中定义初始数据 hasOnShow: false 2、onshow函数中: onShow: function () {if (this.data.hasOnShow)…

列表中的字典排序

list1 [ {age: 4, name: 李四, sex: 1}, {age: 5, name: 王五, sex: 1}, {age: 6, name: 赵六, sex: 1}, {age: 3, name: 张三, sex: 1}, {age: 3, name: 张小三, sex: 0},]print (sorted(list1, keylambda dictx: (dictx[age], dictx[sex]),reverseFalse)) pr…

js面试题(2019最新)

Js面试题 数据类型有哪些,那些事基本数据类型,哪些是引用数据类型,如何判断? Js数据类型共8种: 1.Number类型 2.String类型 3.Boolean类型 4.Undefined类型 5.Null类型 6.Object类型 7.Symbol 8.Array类型 其中Object类型…