1
0
mirror of https://github.com/Burrit0z/kai synced 2025-07-04 14:46:47 +00:00

still a bit buggy but much improved

This commit is contained in:
Burrit0z
2020-05-30 19:11:50 -04:00
parent b9d77455ae
commit e4788921d1
6 changed files with 6 additions and 41 deletions

View File

@ -134,6 +134,9 @@
[self.label.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES;
}
[self.heightAnchor constraintEqualToConstant:(bannerHeight + spacing)].active = YES;
[self.widthAnchor constraintEqualToConstant:(self.frame.size.width)].active = YES;
}
return self;
@ -176,29 +179,6 @@
self.battery.chargePercent = (batteryPercentage*0.01);
[self.glyphView setImage:[self.device glyph]];
//[self.heightAnchor constraintEqualToConstant:(bannerHeight + spacing)].active = YES;
if(!self.height) {
self.height.active = NO;
self.height = [self.heightAnchor constraintEqualToConstant:(bannerHeight + spacing)];
self.height.active = YES;
} else {
int height = (bannerHeight + spacing);
self.height.constant = height;
}
if(!self.width) {
self.width.active = NO;
self.width = [self.widthAnchor constraintEqualToConstant:(self.frame.size.width)];
self.width.active = YES;
} //else {
//int width = self.frame.size.width;
//self.width.constant = width;
//}
}