mirror of
https://github.com/Burrit0z/kai
synced 2025-07-02 09:56:47 +00:00
KOV
This commit is contained in:
19
Kai.xm
19
Kai.xm
@ -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
|
Reference in New Issue
Block a user