Browse Source

:no_mouth:

pull/1/head
Burrit0z 4 years ago
parent
commit
ffd3608f2c
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      KAIBatteryCell.mm

+ 5
- 2
KAIBatteryCell.mm View File

[blur.heightAnchor constraintEqualToAnchor:blurPlatter.heightAnchor].active = YES; [blur.heightAnchor constraintEqualToAnchor:blurPlatter.heightAnchor].active = YES;


self.percentLabel.translatesAutoresizingMaskIntoConstraints = NO; self.percentLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.percentLabel.leftAnchor constraintEqualToAnchor:blurPlatter.rightAnchor constant:(- 96)].active = YES;
[self.percentLabel.centerYAnchor constraintEqualToAnchor:blurPlatter.centerYAnchor].active = YES; [self.percentLabel.centerYAnchor constraintEqualToAnchor:blurPlatter.centerYAnchor].active = YES;
[self.percentLabel.widthAnchor constraintEqualToConstant:37].active = YES;
[self.percentLabel.widthAnchor constraintEqualToConstant:32].active = YES;
[self.percentLabel.heightAnchor constraintEqualToConstant:12].active = YES; [self.percentLabel.heightAnchor constraintEqualToConstant:12].active = YES;


self.label.translatesAutoresizingMaskIntoConstraints = NO; self.label.translatesAutoresizingMaskIntoConstraints = NO;
[self.label.centerYAnchor constraintEqualToAnchor:blurPlatter.centerYAnchor].active = YES; [self.label.centerYAnchor constraintEqualToAnchor:blurPlatter.centerYAnchor].active = YES;
if(!hidePercent) { if(!hidePercent) {
[self.label.rightAnchor constraintEqualToAnchor:self.percentLabel.leftAnchor constant:-4.5].active = YES; [self.label.rightAnchor constraintEqualToAnchor:self.percentLabel.leftAnchor constant:-4.5].active = YES;
} else {
[self.label.rightAnchor constraintEqualToAnchor:self.label.leftAnchor].active = YES;
} }
[self.label.heightAnchor constraintEqualToConstant:25].active = YES; [self.label.heightAnchor constraintEqualToConstant:25].active = YES;


[self.battery.widthAnchor constraintEqualToConstant:20].active = YES; [self.battery.widthAnchor constraintEqualToConstant:20].active = YES;
[self.battery.heightAnchor constraintEqualToConstant:10].active = YES; [self.battery.heightAnchor constraintEqualToConstant:10].active = YES;


[self.percentLabel.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES;

if(hidePercent) { if(hidePercent) {
[self.label.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES; [self.label.rightAnchor constraintEqualToAnchor:self.battery.leftAnchor constant:-4.5].active = YES;
} }

Loading…
Cancel
Save