forked from andrewwiik/Intelix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MTPlatterHeaderContentView.xm
54 lines (46 loc) · 1.16 KB
/
MTPlatterHeaderContentView.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
#import <Intelix/MTPlatterHeaderContentView.h>
%hook MTPlatterHeaderContentView
%property (nonatomic, assign) BOOL isIntelixSectionHeader;
- (CGSize)sizeThatFits:(CGSize)size {
// HBLogInfo(@"Method #110");
if (!self.isIntelixSectionHeader) return %orig;
return CGSizeZero;
}
- (BOOL)isHidden {
// HBLogInfo(@"Method #111");
if (!self.isIntelixSectionHeader) return %orig;
return YES;
}
- (void)setIsHidden:(BOOL)isHidden {
// HBLogInfo(@"Method #112");
%orig(!self.isIntelixSectionHeader ? isHidden : YES);
}
- (CGFloat)alpha {
if (!self.isIntelixSectionHeader) return %orig;
return 0.0;
}
- (void)setAlpha:(CGFloat)alpha {
// HBLogInfo(@"Method #113");
if (!self.isIntelixSectionHeader) {
%orig;
return;
}
%orig(0.0f);
}
- (CGFloat)_headerHeightForWidth:(CGFloat)width {
// HBLogInfo(@"Method #114");
if (!self.isIntelixSectionHeader) return %orig;
return 0.0f;
}
- (CGFloat)contentBaseline {
// HBLogInfo(@"Method #115");
if (!self.isIntelixSectionHeader) return %orig;
return 0;
}
- (void)layoutSubviews {
%orig;
// HBLogInfo(@"Method #116");
//if (!!self.isIntelixSectionHeader) {
[self setHidden:!self.isIntelixSectionHeader ? NO : YES];
}
%end