https://github.com/qmui/qmui_ios_templates
QMUI iOS class file templates for Xcode
https://github.com/qmui/qmui_ios_templates
Last synced: 10 months ago
JSON representation
QMUI iOS class file templates for Xcode
- Host: GitHub
- URL: https://github.com/qmui/qmui_ios_templates
- Owner: QMUI
- License: mit
- Created: 2017-04-06T12:07:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-22T12:16:58.000Z (almost 8 years ago)
- Last Synced: 2025-04-10T21:38:49.268Z (about 1 year ago)
- Language: Objective-C
- Size: 21.5 KB
- Stars: 130
- Watchers: 6
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QMUI_iOS_Templates
当我们在 Xcode 里新建文件时,Xcode 默认提供了多种文件模板,并且不同的 class,模板里默认提供的内容也不一样。
这个项目主要是配合 [QMUI iOS](https://github.com/QMUI/QMUI_iOS) 使用,为 QMUI iOS 里常用的几个基类提供模板,另外系统的 UIKit 里的一些常用类也有相应的模板提供,具体请查看项目文件。
## 使用方式
进入 Xcode 模板存放路径:
```
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File\ Templates/Source
```
将项目拉取下来,并命名为 `QMUI Class.xctemplate`(文件夹名自由定义,后缀名不可变),注意这个目录是系统目录,需要 root 权限才能修改,所以所有 git 命令都需要加 `sudo`。
```bash
sudo git clone https://github.com/QMUI/QMUI_iOS_Templates.git QMUI\ Class.xctemplate
```
无需重启 Xcode,直接新建文件,即可看到“QMUI Class”的模板可供选择。
