Browse Source

KOV

pull/1/head
Burrit0z 4 years ago
parent
commit
df73ca33d8
1 changed files with 15 additions and 4 deletions
  1. +15
    -4
      Kai.xm

+ 15
- 4
Kai.xm View File

@@ -17,6 +17,9 @@
-(void)KaiUpdate;
@end

@interface SBCoverSheetPrimarySlidingViewController
-(void)KaiUpdate;
@end

BOOL setFrame = NO;
CSMainPageView *batteryWidget;
@@ -48,14 +51,22 @@ CGRect originalBattery;
}

%end*/
/*
%hook SBCoverSheetPrimarySlidingViewController

-(void)viewWillAppear:(BOOL)arg1 {
%orig;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(KaiUpdate)
name:@"KaiInfoChanged"
object:nil];

}

%new
-(void)KaiUpdate {
[batteryWidget.battery updateBattery];
[batteryWidget KaiUpdate];

}
/*
-(void)viewWillDisappear:(BOOL)arg1 {
@@ -63,7 +74,7 @@ CGRect originalBattery;
[batteryWidget.battery updateBattery];
[batteryWidget KaiUpdate];
}*/
//%end
%end


%hook CSMainPageView
@@ -80,7 +91,6 @@ CGRect originalBattery;
batteryWidget = self;
}
[self KaiUpdate];

}

%new
@@ -115,6 +125,7 @@ CGRect originalBattery;

-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{
NSLog(@"It works");
[[NSNotificationCenter defaultCenter] postNotificationName:@"KaiInfoChanged" object:nil userInfo:nil];
}
%end

Loading…
Cancel
Save