From b70d126fc7e654be8ab1bb07887dfbb958a8ecd7 Mon Sep 17 00:00:00 2001 From: Burrit0z Date: Thu, 21 May 2020 21:14:27 -0400 Subject: [PATCH] bro im shit dev smh --- KAIBattery.mm | 2 +- KAIBatteryCell.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KAIBattery.mm b/KAIBattery.mm index 5adde72..dfc3241 100644 --- a/KAIBattery.mm +++ b/KAIBattery.mm @@ -70,7 +70,7 @@ long long lastPercentage; NSLog(@"Kai: Updating cell: %@ for device:%@", cell, device); } else if(![self.displayingDevices containsObject:deviceName]) { KAIBatteryCell *newCell = [[KAIBatteryCell alloc] initWithFrame:CGRectMake(0, y, self.frame.size.width, bannerHeight) device:device]; - [self.superview addSubview:newCell]; + [self addSubview:newCell]; [self.displayingDevices addObject:deviceName]; //y+=bannerHeight + spacing; NSLog(@"Kai: Added cell: %@ for device:%@", cell, device); diff --git a/KAIBatteryCell.mm b/KAIBatteryCell.mm index 33d8050..bac1c08 100644 --- a/KAIBatteryCell.mm +++ b/KAIBatteryCell.mm @@ -85,7 +85,7 @@ NSMutableArray *deviceInstances; } else if(bannerAlign==3) { //right [blank.rightAnchor constraintEqualToAnchor:self.rightAnchor constant:horizontalOffset].active = YES; } - [blank.topAnchor constraintEqualToAnchor:self.topAnchor constant:self.frame.origin.y].active = YES; + [blank.topAnchor constraintEqualToAnchor:self.topAnchor].active = YES; [blank.widthAnchor constraintEqualToConstant:((self.frame.size.width) + bannerWidthFactor)].active = YES; [blank.heightAnchor constraintEqualToConstant:bannerHeight].active = YES;