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

-(void)KaiUpdate; -(void)KaiUpdate;
@end @end


@interface SBCoverSheetPrimarySlidingViewController
-(void)KaiUpdate;
@end


BOOL setFrame = NO; BOOL setFrame = NO;
CSMainPageView *batteryWidget; CSMainPageView *batteryWidget;
} }


%end*/ %end*/
/*
%hook SBCoverSheetPrimarySlidingViewController %hook SBCoverSheetPrimarySlidingViewController


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

}

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

} }
/* /*
-(void)viewWillDisappear:(BOOL)arg1 { -(void)viewWillDisappear:(BOOL)arg1 {
[batteryWidget.battery updateBattery]; [batteryWidget.battery updateBattery];
[batteryWidget KaiUpdate]; [batteryWidget KaiUpdate];
}*/ }*/
//%end
%end




%hook CSMainPageView %hook CSMainPageView
batteryWidget = self; batteryWidget = self;
} }
[self KaiUpdate]; [self KaiUpdate];

} }


%new %new


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

Loading…
Cancel
Save