我已经用谷歌搜索并修改我的 .clang 格式文件几个小时了。
我希望我的 block 看起来像这样:
[UIView animateWithDuration:0.3 animations:^{
label.alpha = 0;
} completion:^(BOOL finished) {
label.hidden = YES;
}];
不是这个:
[UIView animateWithDuration:0.3 animations:^{
label.alpha = 0;
}
completion:^(BOOL finished) {
label.hidden = YES;
}];
我似乎找不到正确的参数或参数组。
我也尝试过 Uncrustify,但盯着新的配置文件语法并不是可取的,尤其是在有 clang 格式解决方案的情况下。
最佳答案
// clang-format off
[UIView animateWithDuration:1 animations:^{
} completion:^(BOOL finished){
}];
// clang-format on
关于ios - 用于 block 的 Objective-C clang 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35822386/