美文网首页
ios逆向-theos编译问题

ios逆向-theos编译问题

作者: Simple_Code | 来源:发表于2020-07-16 11:25 被阅读0次

问题一:

在make编译时可能会出现以下错误,原因是self在此处会被认为是id类型,而numberOfSectionsInTableView方法属于FindFriendEntryViewController的方法,如果不对FindFriendEntryViewController进行前向声明,是无法调用numberOfSectionsInTableView的。具体前向声明代码如上

Tweak.x:37:30: error: receiver type 'FindFriendEntryViewController' for instance
      message is a forward declaration
        if ([indexPath section] == [self numberOfSectionsInTableView:tab...
                                    ^~~~
Tweak.x:34:8: note: forward declaration of class here
@class FindFriendEntryViewController;

解决办法:

/* 对FindFriendEntryViewController及numberOfSectionsInTableView方法做前向声明。
 * 否则无法调用[self numberOfSectionsInTableView:]方法
 */
@interface FindFriendEntryViewController

- (long long)numberOfSectionsInTableView:(id)tableView;

@end

相关文章

网友评论

      本文标题:ios逆向-theos编译问题

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