Explorar el Código

idk

pull/1/head
Burrit0z hace 4 años
padre
commit
b9d77455ae
Se han modificado 2 ficheros con 10 adiciones y 3 borrados
  1. +3
    -3
      KAIBatteryStack.mm
  2. +7
    -0
      Kai.xm

+ 3
- 3
KAIBatteryStack.mm Ver fichero

@@ -117,11 +117,11 @@ long long lastPercentage;

} else {
int height;
/*if([self.superview.subviews objectAtIndex:([self.superview.subviews count] - 1)] == self) {
if([self.superview.subviews objectAtIndex:([self.superview.subviews count] - 1)] == self) {
height = (self.number * (bannerHeight + spacing));
} else {*/
} else {
height = (self.number * (bannerHeight + spacing)) - spacing;
//}
}
self.heightConstraint.constant = height;

UIStackView *s = (UIStackView *)(self.superview);

+ 7
- 0
Kai.xm Ver fichero

@@ -61,6 +61,13 @@
dispatch_async(dispatch_get_main_queue(), ^{

[[KAIBatteryStack sharedInstance] updateBattery];
if([KAIBatteryStack sharedInstance].number == 0) {
[[KAIBatteryStack sharedInstance] removeFromSuperview];
[[self stackView] removeArrangedSubview:[KAIBatteryStack sharedInstance]];
} else if(![[self stackView].subviews containsObject:[KAIBatteryStack sharedInstance]]) {
[[self stackView] addSubview:[KAIBatteryStack sharedInstance]];
[[self stackView] addArrangedSubview:[KAIBatteryStack sharedInstance]];
}
if([KAISelf.superview respondsToSelector:@selector(fixComplicationsViewFrame)]) {
[KAISelf.superview performSelector:@selector(fixComplicationsViewFrame) withObject:KAISelf.superview afterDelay:0.35];
//[KAISelf.superview performSelector:@selector(fixComplicationsViewFrame) withObject:KAISelf.superview afterDelay:0.5];

Cargando…
Cancelar
Guardar