mirror of
https://github.com/Burrit0z/kai
synced 2025-07-04 00:16:46 +00:00
fixes
This commit is contained in:
@ -14,6 +14,7 @@ KAIBattery *instance;
|
|||||||
self.batteryLabel.numberOfLines = 0;*/
|
self.batteryLabel.numberOfLines = 0;*/
|
||||||
[self updateBattery];
|
[self updateBattery];
|
||||||
[self darkLightMode];
|
[self darkLightMode];
|
||||||
|
self.userInteractionEnabled = NO;
|
||||||
//[self addSubview:self.batteryLabel];
|
//[self addSubview:self.batteryLabel];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
|
27
Kai.xm
27
Kai.xm
@ -22,6 +22,7 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@interface CSMainPageView : UIView
|
@interface CSMainPageView : UIView
|
||||||
|
-(void)updateForPresentation:(id)arg1;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface _CSSingleBatteryChargingView : UIView
|
@interface _CSSingleBatteryChargingView : UIView
|
||||||
@ -69,6 +70,7 @@ CGRect originalBattery;
|
|||||||
[base KaiInit];
|
[base KaiInit];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[base KaiUpdate];
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
@ -81,6 +83,8 @@ CGRect originalBattery;
|
|||||||
name:@"KaiInfoChanged"
|
name:@"KaiInfoChanged"
|
||||||
object:nil];
|
object:nil];
|
||||||
|
|
||||||
|
[self KaiUpdate];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%new
|
%new
|
||||||
@ -88,12 +92,6 @@ CGRect originalBattery;
|
|||||||
[batteryWidget updateBattery];
|
[batteryWidget updateBattery];
|
||||||
[base KaiUpdate];
|
[base KaiUpdate];
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
-(void)viewWillDisappear:(BOOL)arg1 {
|
|
||||||
%orig;
|
|
||||||
[batteryWidget.battery updateBattery];
|
|
||||||
[batteryWidget KaiUpdate];
|
|
||||||
}*/
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|
||||||
@ -105,10 +103,14 @@ CGRect originalBattery;
|
|||||||
[batteryWidget darkLightMode];
|
[batteryWidget darkLightMode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)setNeedsLayout {
|
||||||
|
%orig;
|
||||||
|
[self KaiUpdate];
|
||||||
|
}
|
||||||
|
|
||||||
%new
|
%new
|
||||||
-(void)KaiInit {
|
-(void)KaiInit {
|
||||||
if(!setFrame) {
|
if(!setFrame) {
|
||||||
original = self.frame;
|
|
||||||
UIView *scroller;
|
UIView *scroller;
|
||||||
if([self.subviews count] > 1) {
|
if([self.subviews count] > 1) {
|
||||||
UIView *temp = [self.subviews objectAtIndex:1];
|
UIView *temp = [self.subviews objectAtIndex:1];
|
||||||
@ -117,6 +119,11 @@ CGRect originalBattery;
|
|||||||
base = self;
|
base = self;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*UIView *notiView;
|
||||||
|
if([self.subviews count] > 0) {
|
||||||
|
notiView = [self.subviews objectAtIndex:0];
|
||||||
|
}*/
|
||||||
|
original = scroller.frame;
|
||||||
KAIBattery *battery = [[KAIBattery alloc] initWithFrame:CGRectMake(8, 0, self.frame.size.width - 16, self.frame.size.height)];
|
KAIBattery *battery = [[KAIBattery alloc] initWithFrame:CGRectMake(8, 0, self.frame.size.width - 16, self.frame.size.height)];
|
||||||
originalBattery = battery.frame;
|
originalBattery = battery.frame;
|
||||||
[scroller addSubview:battery];
|
[scroller addSubview:battery];
|
||||||
@ -131,6 +138,11 @@ CGRect originalBattery;
|
|||||||
%new
|
%new
|
||||||
-(void)KaiUpdate {
|
-(void)KaiUpdate {
|
||||||
[UIView animateWithDuration:0.3 animations:^{
|
[UIView animateWithDuration:0.3 animations:^{
|
||||||
|
/*UIView *notiView;
|
||||||
|
if([self.subviews count] > 0) {
|
||||||
|
notiView = [self.subviews objectAtIndex:0];
|
||||||
|
}*/
|
||||||
|
|
||||||
batteryWidgetController.frame = CGRectMake(
|
batteryWidgetController.frame = CGRectMake(
|
||||||
original.origin.x,
|
original.origin.x,
|
||||||
original.origin.y + (batteryWidget.number * 85),
|
original.origin.y + (batteryWidget.number * 85),
|
||||||
@ -144,7 +156,6 @@ CGRect originalBattery;
|
|||||||
originalBattery.size.width,
|
originalBattery.size.width,
|
||||||
originalBattery.size.height
|
originalBattery.size.height
|
||||||
);
|
);
|
||||||
|
|
||||||
}];
|
}];
|
||||||
[batteryWidget darkLightMode];
|
[batteryWidget darkLightMode];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user