2016-02-29 33 views
0

我想我這樣的多行的方法調用:可以在Objective-C中Uncrustify縮進多行方法調用嗎?

[self.markAsFinishedButton 
    setBackgroundImage:[UIImage imageWithColor:[UIColor blueButtonColor] andSize:CGSizeMake(1, 1)] 
    forState:UIControlStateHighlighted]; 

但是現在,它看起來像這樣:

[self.markAsFinishedButton 
setBackgroundImage:[UIImage imageWithColor:[UIColor blueButtonColor] andSize:CGSizeMake(1, 1)] 
forState:UIControlStateHighlighted]; 

.uncrustify文件是在這裏: https://gist.github.com/nickcheng/d107d6f0f74ef381fb8e

BTW,我可以通過使用這樣的配置來獲得正確的縮進:

_tapRecognizer = [[UITapGestureRecognizer alloc] 
    initWithTarget:self 
    action:@selector(controlButtonTapped)]; 

有人可以幫我嗎?謝謝!

回答

0

我使用這兩個(第二個是用於消息聲明):

align_oc_msg_colon_span = 10 
align_oc_decl_colon = true 

但我通常對準這樣的代碼:

[self.markAsFinishedButton setBackgroundImage:[UIImage imageWithColor:[UIColor blueButtonColor] 
                   andSize:CGSizeMake(1, 1)] 
            forState:UIControlStateHighlighted]; 
相關問題