-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTweak.x
42 lines (33 loc) · 885 Bytes
/
Tweak.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@interface YTIShareTargetServiceUpdateRenderer
- (int)serviceId;
@end
@interface YTShareTargetCell: UIView
- (void)didTap;
@end
@interface YTShareRequestViewController: UIViewController
@end
%hook YTShareTargetCell
- (void)drawRect:(CGRect)rect {
%orig;
NSLog(@"!!!draw");
UIView* superview = self.superview;
NSLog(@"!!!%@", superview);
if ([superview isKindOfClass: [UICollectionView class]]) {
UICollectionView* collectionView = (UICollectionView*)superview;
[collectionView setContentOffset: CGPointMake([collectionView contentSize].width - collectionView.frame.size.width, 0) animated: NO];
}
}
- (void)setEntry:(YTIShareTargetServiceUpdateRenderer*)entry {
%orig;
NSLog(@"!!!%d", [entry serviceId]);
if ([entry serviceId] != 82) {
return;
}
[self didTap];
}
%end
%hook YTShareRequestViewController
- (void)viewDidLoad {
[self.view setAlpha: 0.1];
}
%end