1

那是我的代码...我有一些错误...你能帮帮我吗?

@interface PdfViewerAppDelegate : UIViewController
@property(assign) BOOL myVariable;
 -(void)setup;

@end



%hook PdfViewerAppDelegate

-(void)setup{

    %orig;

    myVariable=1;
}

%end

这就是错误

Compiling Tweak.xm...
Tweak.xm: In function ‘void _logos_method$_ungrouped$PdfViewerAppDelegate$setup(PdfViewerAppDelegate*, objc_selector*)’:
Tweak.xm:15: error: ‘myVariable’ was not declared in this scope
make[2]: *** [obj/Tweak.xm.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [GG.all.tweak.variables] Error 2
4

1 回答 1

0

将“myVariable”声明为全局变量

于 2012-10-11T17:26:47.097 回答