2014-01-19 30 views
0

有没有在Xcode一小段路格式如下:如何格式化长Objective-C方法?

UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:<#(NSString *)#> message:<#(NSString *)#> delegate:<#(id)#> cancelButtonTitle:<#(NSString *)#> otherButtonTitles:<#(NSString *), ...#>, nil]; 

UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:<#(NSString *)#> 
                message:<#(NSString *)#> 
                delegate:<#(id)#> 
              cancelButtonTitle:<#(NSString *)#> 
              otherButtonTitles:<#(NSString *), ...#>, nil]; 
+0

,我手动按下每个参数后进入... – Allen

+2

新闻在每个参数后输入。很难相信你定义了如此多的信息,以至于成为瓶颈。 –

+0

有很多扩展参数的启动方法,为什么挂在消息上?这是一个不便之处,如果没有 – Allen

回答

1

这里是一个很好的XCode插件ClangFormat通过@travisjeffery。它会节省您一些时间按下输入。

+0

根据以下发行说明,ClangFormat应该成为3.4版默认Clang安装的一部分:http: //llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html –

+0

它被安装但默认不被Xcode使用。这两个插件做 –