我在 theos 中进行了调整,需要查看一些变量的名称。
假设一个方法如下所示:
- (UILabel*)makeALabel {
UILabel *name_that_i_want = [[UILabel alloc] init];
[name_that_i_want setText:@"abcdefg"];
return name_that_i_want;
}
当我查看此方法的标题时,我会看到:
-(id)makeALabel;
当我挂钩时,有没有办法让我转储在该方法中声明的变量?
-(id)makeALabel {
%orig;
//somehow get name of the label declared
UILabel *label = MSHookIvar<UILabel *>(self, "name_that_i_want");
}