-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcounted.h
115 lines (89 loc) · 3.04 KB
/
counted.h
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
#import <Cephei/HBPreferences.h>
@interface _UILegibilitySettings
-(UIColor *)primaryColor;
@end
@interface SBUILegibilityLabel : UIView
-(void)setString:(NSString *)arg1;
@property (assign,nonatomic) long long textAlignment;
-(_UILegibilitySettings *)legibilitySettings;
@end
//things
CGRect subFrame;
bool addedView;
UIView *touchView;
HBPreferences *file;
bool activated;
UILabel *countDownLabel;
CGRect oldFrame;
CGRect frame;
//settings
bool enabled;
bool alwaysShowCountdown;
int chosenMode;
int alignment;
int font;
NSDate *myDate;
@interface retrieveDateStuff : NSObject
-(NSString *)getDateString;
@end
@implementation retrieveDateStuff
-(NSString *)getDateString {
enabled = [([file objectForKey:@"kEnabled"] ?: @(true)) boolValue];
alwaysShowCountdown = [([file objectForKey:@"kPermanent"] ?: @(false)) boolValue];
//get chosen mode
chosenMode = [([file objectForKey:@"kTextFormat"] ?: @(0)) intValue];
//get chosen mode
font = [([file objectForKey:@"kFont"] ?: @(0)) intValue];
//set alignment
alignment = [([file objectForKey:@"kAlign"] ?: @(1)) intValue];
//get subject
NSString *subjectString = @"[blank]";
if ([file objectForKey:@"kSubject"] != nil) {
subjectString = [file objectForKey:@"kSubject"];
}
//set date shit
if ([file objectForKey:@"kDate"] != nil) {
myDate = [file objectForKey:@"kDate"];
} else {
myDate = [NSDate date];
}
NSDate *startDate = [NSDate date];
NSTimeInterval secondsBetween = [myDate timeIntervalSinceDate:startDate];
int numberOfDays = secondsBetween / 86400;
//set it
NSString *dateString;
if (chosenMode == 0) {
dateString = [NSString stringWithFormat:@"Days Till %@: %d", subjectString ,numberOfDays];
} else if (chosenMode == 1) {
dateString = [NSString stringWithFormat:@"Days: %d", numberOfDays];
} else if (chosenMode == 2) {
dateString = [NSString stringWithFormat:@"%@: %d days", subjectString, numberOfDays];
} else if (chosenMode == 3) {
dateString = [NSString stringWithFormat:@"%@: %dd", subjectString, numberOfDays];
} else if (chosenMode == 4) {
dateString = [NSString stringWithFormat:@"%d Days Till %@", numberOfDays, subjectString];
}
return dateString;
}
@end
@interface SBFLockScreenDateSubtitleView : UIView <UIGestureRecognizerDelegate>
-(NSString *)string;
-(void)_updateForCurrentSizeCategory;
@end
@interface SBFLockScreenDateSubtitleDateView : SBFLockScreenDateSubtitleView
-(NSDate *)date;
-(void)setDate:(NSDate *)arg1 ;
-(void)applyCountdown;
@end
@interface BSUIScrollView : UIScrollView
@end
@interface SBFLockScreenDateView : UIView
@end
@interface CSCoverSheetViewBase : UIView
@end
@interface CSTeachableMomentsContainerView : UIView
@property (nonatomic,retain) SBUILegibilityLabel * callToActionLabel; //@synthesize callToActionLabel=_callToActionLabel - In the implementation block
@end
@interface SBUICallToActionLabel : UIView
@property (nonatomic,copy) NSString * text; //@synthesize text=_text - In the implementation block
@end