Browse Source

Fount it that iOS 8 fix works for iOS 9 and makes it even look better;

remove iOS 9 codes
master
Mario Cheung 4 years ago
parent
commit
63c503dd2b
1 changed files with 4 additions and 21 deletions
  1. +4
    -21
      Tweak.xm

+ 4
- 21
Tweak.xm View File

@@ -40,8 +40,7 @@ static void savePressed(CFNotificationCenterRef center, void *observer, CFString
prefs = [[NSMutableDictionary alloc] initWithContentsOfFile:settingsPath];
}

static BOOL isiOS9 = NO;
static BOOL isiOS8Refreshed = NO;
static BOOL isLunarDateRefreshed = NO;
static SBTodayTableHeaderView *stattodayHeaderView;
static SBFLockScreenDateView *lockScreenDateView;
static float originx = 0.0;
@@ -58,9 +57,8 @@ static float sizeheight = 0.0;
-(void)_layoutLunarDateLabel{
%orig;
if(isiOS9) return;
if(!isiOS8Refreshed) {
isiOS8Refreshed = YES;
if(!isLunarDateRefreshed) {
isLunarDateRefreshed = YES;
[lockScreenDateView _updateLabels];
lockScreenDateView = nil;
}
@@ -104,13 +102,6 @@ static float sizeheight = 0.0;
}else{
self.duplexCalendarLabel.font = [font fontWithSize:[FontSizeTextField floatValue]];
}
if(isiOS9 && self.duplexCalendarLabel){
if([self isDateHidden]){
self.duplexCalendarLabel.hidden = true;
}else{
self.duplexCalendarLabel.hidden = false;
}
}

}

@@ -141,18 +132,11 @@ static float sizeheight = 0.0;
}


-(void)setDateHidden:(bool)arg1{
%orig(arg1);

if(isiOS9 && self.duplexCalendarLabel){
self.duplexCalendarLabel.hidden = arg1;
}
}

-(void)_setDateAlpha:(double)arg1{
%orig(arg1);

if(!isiOS9 && self.duplexCalendarLabel){
if(self.duplexCalendarLabel){
UILabel *originalLabel = MSHookIvar<UILabel *>(self, "_dateLabel");
self.duplexCalendarLabel.alpha = originalLabel.alpha;
}
@@ -173,7 +157,6 @@ self.dateInSettings = nil;
%end

%ctor{
if(@available(iOS 9.0, *)) isiOS9 = YES;
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),
(void*)myObserver,
savePressed,

Loading…
Cancel
Save