Tweak Hook 类成员变量
用途非常大~~~/*
描述:Hook 类成员变量
作者: 飘云
实际:2014-08-19
*/
#import <substrate.h>
// 这里换成实际需要hook的类,自由发挥
@interface TheTestClass : NSObject{
NSString *_testVariable;
}
- (void)doSomething;
@end
NSString *_testVariableHooked;
%hook TheTestClass
- (void)doSomething
{
_testVariableHooked = MSHookIvar<NSString *>(self, "_testVariable");
_testVariableHooked = @"https://www.chinapyg.com";
}
%end
// 参考资料:http://stackoverflow.com/questions/11918934/theos-trying-to-take-over-uiview-subjectline-from-ckcontententryview-in-chatki
飘云者?大神也! 支持楼主,好,
页:
[1]