-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTweak.xm
More file actions
21 lines (15 loc) · 776 Bytes
/
Tweak.xm
File metadata and controls
21 lines (15 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* How to Hook with Logos
Hooks are written with syntax similar to that of an Objective-C @implementation.
You don't need to #include <substrate.h>, it will be done automatically, as will
the generation of a class list and an automatic constructor.
*/
@interface MMUILongPressImageView : UIView
@end
%hook MMHeadImageView
- (void)updateUsrName:(NSString *)usrName withHeadImgUrl:(NSString *)url {
%orig;
NSString *mySelfUserName = [[%c(SettingUtil) performSelector:@selector(getMainSetting)] performSelector:@selector(m_nsUsrName)];
MMUILongPressImageView *headImageView = MSHookIvar<MMUILongPressImageView *>(self, "_headImageView");
headImageView.transform = CGAffineTransformMake([usrName isEqualToString:mySelfUserName] ? -1 : 1, 0, 0, 1, 0, 0);
}
%end