shell命令
假设你的属性有以下这些:
@property (weak, nonatomic) IBOutlet UILabel *locationLabel;
@property (strong, nonatomic) NSString *website;
@property (weak, nonatomic) IBOutlet UIButton *fbButton;
@property (weak, nonatomic) IBOutlet UIImageView *fbImage;
@property (strong, nonatomic) NSString *twitter;
@property (weak, nonatomic) IBOutlet UIButton *twButton;
@property (weak, nonatomic) IBOutlet UILabel *webLabel;
@property (weak, nonatomic) IBOutlet UIImageView *profilePhoto;
@property (strong, nonatomic) NSString *facebook;
@property (weak, nonatomic) IBOutlet UIImageView *twImage;
@property (weak, nonatomic) IBOutlet UILabel *aboutLabel;
@property (weak, nonatomic) IBOutlet UIButton *webButton;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
如果不用插件怎么对齐这些呢,强大的shell脚本可以帮你实现!
Mac OS X允许你创建整个操作系统全局通用的服务,你将用它来创建一个用在Xcode中的脚本服务,按如下步骤来设置:
(1)使用Spotlight来搜索Automator,并打开它
(2)然后点击File->New,并选择服务(service)一项
(3)在Actions筛选栏,输入shell,然后双击运行shell脚本Run Shell Script
(4)在新添加的服务的菜单栏上,检查Output replaces selected text
(5)将脚本内容切换至sort | uniq
(6)同时按下command s,将服务保存为 Sort & Uniq
如果你想要更强大的命令来实现更强大的功能,请好好学习shell脚本命令吧!
以下是步骤图解:
搜索Automator
或者直接去找这个玩意
file-->new
service
挑勾-->输入脚本命令-->保存
到这里已经全部结束,使用的方法就是本文第一场动态图!
命令很强大,赶紧学习shell去吧....
记着点完赞再走哦...
不要离开我...