forked from andrewwiik/Intelix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tweak.xm
67 lines (57 loc) · 1.66 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
#import <Intelix/ITXNCGroupBackgroundView.h>
@interface NCNotificationListCollectionViewFlowLayout : UICollectionViewFlowLayout
@property (nonatomic,retain) NSMutableArray * insertedIndexPaths;
@property (nonatomic,retain) NSMutableArray * removedIndexPaths;
@property (nonatomic,retain) NSMutableArray * replacedIndexPaths;
@end
@interface NCNotificationCombinedListViewController : UICollectionViewController
@end
%hook UIView
%new
- (void)testCornersThing {
ITXNCGroupBackgroundView *corners = [[ITXNCGroupBackgroundView alloc] init];
[self addSubview:corners];
corners.frame = CGRectMake(0, self.bounds.size.height*0.25, self.bounds.size.width, self.bounds.size.height*0.5);
[self bringSubviewToFront:corners];
// corners.topCornerRadius = 13;
// corners.bottomCornerRadius = 13;
// corners.topInset = 20;
// corners.bottomInset = 50;
[corners layoutSubviews];
}
%end
@interface UICollectionViewFlowLayout (ITXPrivate)
- (CGRect)itx_frameForSection:(NSInteger)section;
@end
%hook NCNotificationListSectionRevealHintView
// - (void)_updateHintTitle {
// // HBLogInfo(@"I am Crashing Here");
// }
- (NSDate *)titleDate {
// HBLogInfo(@"Method #107");
NSDate *date = [NSDate date];
return date;
}
%end
%hook NSCalendar
- (BOOL)isDateInToday:(NSDate *)date {
// HBLogInfo(@"Method #108");
NSDate *theDate = date;
if (!theDate || theDate == nil) {
theDate = [NSDate date];
}
BOOL result = %orig(theDate);
return result;
}
%end
%hook NCNotificationChronologicalList
- (id)_titleForDate:(id)date {
// HBLogInfo(@"Method #109");
if (!date || date == nil) {
date = [NSDate date];
}
// HBLogInfo(@"I am Crashing Here #2");
return %orig(date);
// return %orig;
}
%end