-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tweak.xm
90 lines (80 loc) · 1.67 KB
/
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Enable home gestures
%hook BSPlatform
- (NSInteger)homeButtonType {
return 2;
}
%end
// Hide home bar
%hook MTLumaDodgePillView
- (id)initWithFrame:(struct CGRect)arg1 {
return NULL;
}
%end
// Hide Camera and Flashlight Button on Coversheet
%hook SBDashBoardQuickActionsViewController
-(BOOL)hasFlashlight{
return NO;
}
-(BOOL)hasCamera{
return NO;
}
%end
//FUgap, credit to smokin1337
%hook CCUIScrollView
-(void)setContentInset:(UIEdgeInsets)arg1 {
arg1 = UIEdgeInsetsMake(65,0,0,0);
%orig;
}
%end
%hook CCUIHeaderPocketView
-(void)setBackgroundAlpha:(double)arg1 {
arg1 = 0.0;
%orig;
}
%end
%hook _UIStatusBarVisualProvider_iOS
+ (Class)class {
return NSClassFromString(@"_UIStatusBarVisualProvider_Split58");
}
%end
%hook UIStatusBar_Base
+ (Class)_implementationClass {
return NSClassFromString(@"UIStatusBar_Modern");
}
+ (void)_setImplementationClass:(Class)arg1 {
%orig(NSClassFromString(@"UIStatusBar_Modern"));
}
%end
%hook UIKeyboardImpl
+ (UIEdgeInsets)deviceSpecificPaddingForInterfaceOrientation:(long long)arg1 inputMode:(id)arg2 {
UIEdgeInsets orig = %orig;
if (NSClassFromString(@"BarmojiCollectionView")) {
orig.bottom = 60;
} else {
orig.bottom = 40;
}
return orig;
}
%end
%hook UIKeyboardDockView
- (CGRect)bounds {
CGRect bounds = %orig;
if (NSClassFromString(@"BarmojiCollectionView")) {
bounds.size.height += 4;
} else {
bounds.size.height += 20;
}
return bounds;
}
%end
//Thanks to NoisyFlake and his tweak ModernDock
%hook UITraitCollection
- (CGFloat)displayCornerRadius {
return 19;
}
%end
%hook SBDockIconListView
+ (unsigned long long)maxIcons {
return 5;
}
%end