6
votes

I've scoured google and tinkered with my .clang-format file for hours now.

I want my blocks to look like this:

[UIView animateWithDuration:0.3 animations:^{
    label.alpha = 0;
} completion:^(BOOL finished) {
    label.hidden = YES;
}];

Not this:

[UIView animateWithDuration:0.3 animations:^{
    label.alpha = 0;
}
    completion:^(BOOL finished) {
        label.hidden = YES;
    }];

I can't seem to find the right parameter or group of parameters.

I also gave Uncrustify a shot but staring over with a new config file syntax isn't preferable, especially if there is a clang-format solution.

1
Remove the newline after the first block and use space instead,ogres

1 Answers

-3
votes
// clang-format off

[UIView animateWithDuration:1 animations:^{

} completion:^(BOOL finished){

}];
// clang-format on