-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMTPlatterHeaderContentView.xm
More file actions
44 lines (36 loc) · 998 Bytes
/
MTPlatterHeaderContentView.xm
File metadata and controls
44 lines (36 loc) · 998 Bytes
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
#import <Intelix/MTPlatterHeaderContentView.h>
%hook MTPlatterHeaderContentView
%property (nonatomic, assign) BOOL isInRecentsSection;
%property (nonatomic, assign) BOOL isInHistorySection;
- (CGSize)sizeThatFits:(CGSize)size {
if (self.isInHistorySection) return CGSizeZero;
return %orig;
}
- (BOOL)isHidden {
if (self.isInHistorySection) return YES;
if (self.isInRecentsSection) return NO;
return %orig;
}
- (void)setIsHidden:(BOOL)isHidden {
%orig(self.isInHistorySection ? YES : isHidden);
}
- (CGFloat)alpha {
if (self.isInHistorySection) return 0.0;
return %orig;
}
- (void)setAlpha:(CGFloat)alpha {
%orig(self.isInHistorySection ? 0.0 : alpha);
}
- (CGFloat)_headerHeightForWidth:(CGFloat)width {
if (self.isInHistorySection) return 0.0;
return %orig;
}
- (CGFloat)contentBaseline {
if (self.isInHistorySection) return 0.0;
return %orig;
}
- (void)layoutSubviews {
%orig;
if (self.isInHistorySection || self.isInRecentsSection) [self setHidden:[self isHidden]];
}
%end