美文网首页
Tweak 中使用self报错的问题

Tweak 中使用self报错的问题

作者: CYC666 | 来源:发表于2020-07-13 19:55 被阅读0次

错误:

Tweak.x:16:3: error: receiver type 'MMTableView' for instance message is a forward declaration

        [self addSubView:view];

         ^~~~

Tweak.x:26:8: note: forward declaration of class here

@class MMTableView; 

解决:

1、新建文件

MMTableView.h

2、里面添加

@interface MMTableView : UITableView

@end

3、Tweak.x中导入

#import "MMTableView.h"

|||||success|||||

相关文章

网友评论

      本文标题:Tweak 中使用self报错的问题

      本文链接:https://www.haomeiwen.com/subject/tpuzcktx.html