How to format objective-c block with clang-format?

后端 未结 2 746
野的像风
野的像风 2021-02-20 02:18

I have the following code, for example:

[cardRegistrationVC setCancelBlock:^{
  [weakSelf.navigationController popViewControllerAnimated:YES];
}];
2条回答
  •  自闭症患者
    2021-02-20 02:30

    Finally I ended up writing blocks like this:

    [cardRegistrationVC setCancelBlock:^{   
      [weakSelf.navigationController popViewControllerAnimated:YES];
    
    }];
    

    Empty line at the end works ok. Or you have to disable column limit:

    #ColumnLimit: 120
    

提交回复
热议问题