加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

objective-c – Uncrustify obj-c:调用super,interface声明和实

发布时间:2020-12-14 19:04:53 所属栏目:百科 来源:网络整理
导读:如何在使用uncrustify调用super之后添加换行符 当前: - (void)someFunction{ [super someFunction]; more stuff; and more stuff;} 期望: - (void)someFunction{ [super someFunction]; more stuff; and more stuff;} 如何在界面声明和实现声明之前和之后
如何在使用uncrustify调用super之后添加换行符

当前:

- (void)someFunction
{
   [super someFunction];
   more stuff;
   and more stuff;
}

期望:

- (void)someFunction
{
   [super someFunction];

   more stuff;
   and more stuff;
}

如何在界面声明和实现声明之前和之后添加换行符

当前:

@interface SCLoginScreenViewController ()
@property (weak,nonatomic) IBOutlet UIView *someView;
@property (weak,nonatomic) IBOutlet UIView *anotherView;
@end
@implementation SCLoginScreenViewController
- (void)someFunction
{
}

期望:

@interface SCLoginScreenViewController ()

@property (weak,nonatomic) IBOutlet UIView *anotherView;

@end

@implementation SCLoginScreenViewController

- (void)someFunction
{
}

>我正在使用BBUncrustifyPlugin和UncrustifyX

解决方法

不幸的是,Uncrustify目前不支持任何这些功能

唯一的“新行后”选项如下所示.

(两个未包含在屏幕截图中的是:变量定义块之后的换行计数和变量定义块之后的换行计数不在函数体的顶部)

enter image description here

“换行”部分还有其他一些选项.但同样,它们都不符合你的情况:

(截屏后遗漏的新线)

enter image description here


enter image description here

?1.我使用的是版本2.1.1,我相信这是最新版本

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读