Objective-C clang-format for blocks

Viewed 320

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 Answers
Related