- xcode定制文件模板,UIView绑定xib一键生成,统一头文件标题样式。
- Getting Started
- Comment API
- Examples
- Hope
NSObject-Objective-C
、NSObject-Swift
、UIViewController-Objective-C
、UIViewController-Swift
、UIViewControllerXIB-Objective-C
、UIViewControllerXIB-Swift
、UIView-Objective-C
、UIView-Swift
、UIViewXIB-Objective-C
、UICollectionReusableView-Objective-C
、UICollectionReusableView-Swift
、UICollectionReusableViewXIB-Objective-C
、UICollectionReusableViewXIB-Swift
、UICollectionViewCell-Objective-C
、UICollectionViewCell-Swift
、UICollectionViewCellXIB-Objective-C
、UICollectionViewCellXIB-Swift
、UICollectionViewController-Objective-C
、UICollectionViewController-Swift
、UICollectionViewControllerXIB-Objective-C
、UICollectionViewControllerXIB-Swift
、UITableViewCell-Objective-C
、UITableViewCell-Swift
、UITableViewCellXIB-Objective-C
、UITableViewCellXIB-Swift
、UITableViewController-Objective-C
、UITableViewController-Swift
、UITableViewControllerXIB-Objective-C
、UITableViewControllerXIB-Swift
、UIScrollView
、UITableView
、UICollectionView
- 第一步确定你安装Xcode之后在应用程序中的绝对路径是什么?(可以用终端进入Xcode 中然后pwd下就有Xcode的绝对路径了) 如果你的电脑上安装了两个xcode ,要找到xcode的安装绝对路径 ,确保你找的xcode的绝对路径是对的 比如:xcode的绝对路径是/Applications/Xcode.app ,接下来打开AddJackTemplates.sh文件,把下面图中红色框内的路径改为/Applications/Xcode.app,如果和红色框内的路径一样那么就不用修改了。
- 第二步打开终端,用指令cd 进入目录 AddJackTemplates-master(要找到你存放AddMissingTemplates-master的路径),然后运行里面的脚本AddJackTemplates.sh就ok了。怎么运行脚本呢和运行二进制程序是一样的, 命令行是这样的:. +空格+名称(AddJackTemplates.sh)。
# !/bin/sh
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
FILE_TEMPLATES_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Source"
JACK_APPLICATION_PATH="$PWD/JackTemplates.xctemplate"
cp -R $JACK_APPLICATION_PATH $FILE_TEMPLATES_PATH
IFS=$SAVEIFS
- 存放定制模板的文件夹
- 使用说明文档rtf格式
- xcode6之后创建UIView是不能勾选xib的,创建View如果想用xib,有两种方式
- 创建空的,没有任何关联的xib模板,在控制器里边去加载
- 创建xib模板,创建UIView组件,使xib文件和UIView组件关联起来,这时候相关的UI实现和逻辑,可以在UIView类里边去实现
- AddJackTemplates定制UIView
JCTestView *testView = [JCTestView instanceJackNibView];
testView.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
[self.view addSubview:testView];
- 往往我们创建控制器之后,里边的方法原本是按着顺序写的,可是方法多了之后,就写乱了,这时候需要写mark来区分,每个控制器都需要自己添加,定制化控制器自动生成常用的mark和常用的代码块,这样方便很多。
- If you find bug when used,Hope you can Issues me,Thank you or try to download the latest code of this framework to see the BUG has been fixed or not)
- If you find the function is not enough when used,Hope you can Issues me,I very much to add more useful function to this framework ,Thank you !
- If you want to contribute code for AddJackTemplates,please Pull Requests me
- If you use AddJackTemplates in your develop app,Hope you can send a email to me for your app,my email is 979900351@qq.com。 I Will install your app,and according to the usage of many app,to be a better design and improve to AddJackTemplates,Thank you !