forked from VitaTaf/HomeGesture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTweak.xm
118 lines (107 loc) · 2.31 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
long _dismissalSlidingMode = 0;
bool originalButton;
long _homeButtonType = 1;
// Enable home gestures
%hook BSPlatform
- (NSInteger)homeButtonType {
_homeButtonType = %orig;
if (originalButton) {
originalButton = NO;
return %orig;
} else {
return 2;
}
}
%end
// Hide home bar
%hook MTLumaDodgePillView
- (id)initWithFrame:(struct CGRect)arg1 {
return NULL;
}
%end
// Workaround for TouchID respring bug
%hook SBCoverSheetSlidingViewController
- (void)_finishTransitionToPresented:(_Bool)arg1 animated:(_Bool)arg2 withCompletion:(id)arg3 {
if ((_dismissalSlidingMode != 1) && (arg1 == 0)) {
return;
} else {
%orig;
}
}
- (long long)dismissalSlidingMode {
_dismissalSlidingMode = %orig;
return %orig;
}
%end
// Remove carrier text
%hook UIStatusBarServiceItemView
- (id)_serviceContentsImage {
return nil;
}
- (CGFloat)extraRightPadding {
return 0.0f;
}
- (CGFloat)standardPadding {
return 2.0f;
}
%end
// Workaround for status bar transition bug
%hook CCUIOverlayStatusBarPresentationProvider
- (void)_addHeaderContentTransformAnimationToBatch:(id)arg1 transitionState:(id)arg2 {
return;
}
%end
// Prevent status bar from flashing when invoking control center
%hook CCUIModularControlCenterOverlayViewController
- (void)setOverlayStatusBarHidden:(bool)arg1 {
return;
}
%end
// Prevent status bar from displaying in fullscreen when invoking control center
%hook CCUIStatusBarStyleSnapshot
- (bool)isHidden {
return YES;
}
%end
// Hide home bar in cover sheet
%hook SBDashboardHomeAffordanceView
- (void)_createStaticHomeAffordance {
return;
}
%end
// Restore footer indicators
%hook SBDashBoardViewController
- (void)viewDidLoad {
originalButton = YES;
%orig;
}
%end
// Restore button to invoke Siri
%hook SBLockHardwareButtonActions
- (id)initWithHomeButtonType:(long long)arg1 proximitySensorManager:(id)arg2 {
return %orig(_homeButtonType, arg2);
}
%end
%hook SBHomeHardwareButtonActions
- (id)initWitHomeButtonType:(long long)arg1 {
return %orig(_homeButtonType);
}
%end
// Hide notification hints
%hook NCNotificationListSectionRevealHintView
- (void)_updateHintTitle {
return;
}
%end
// Hide unlock hints
%hook SBDashBoardTeachableMomentsContainerViewController
- (void)_updateTextLabel {
return;
}
%end
// Disable breadcrumb
%hook SBWorkspaceDefaults
- (bool)isBreadcrumbDisabled {
return YES;
}
%end