-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTweak.xm
58 lines (52 loc) · 960 Bytes
/
Tweak.xm
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#import <version.h>
%group iOS11
@interface ThingView : UIView
- (BOOL)isSelectable;
@end
%hook AppStoreBaseSearch
- (void)setIsTrendingEnabled:(BOOL)enabled {
%orig(NO);
}
- (BOOL)isTrendingEnabled {
return NO;
}
- (void)layoutSubviews {
%orig;
for (UIView *view in [self subviews]) {
if ([view respondsToSelector:@selector(isSelectable)]) {
if (![(ThingView *)view isSelectable]) {
view.hidden = YES;
view.alpha = 0;
}
}
}
}
%end
%end
%group iOS10
%hook SKUITrendingSearchView
-(void)setTrendingSearchViews:(id)arg1 {
%orig(nil);
}
-(void)setTrendingTitleView:(id)arg1 {
%orig(nil);
}
%end
%end
%group iOS8
%hook SKUITrendingSearchView
-(void)layoutSubviews {
NO;
}
%end
%end
%ctor {
if (IS_IOS_OR_NEWER(iOS_11_0)) {
%init(iOS11,AppStoreBaseSearch=objc_getClass("AppStore.BaseSearchContainer"));
} else if (IS_IOS_OR_NEWER(iOS_10_0)) {
%init(iOS10);
}
else {
%init(iOS8);
}
}