Browse Source

horizontal

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

+ 5
- 1
KAIBatteryCell.mm View File

} }


[self.heightAnchor constraintEqualToConstant:(bannerHeight + spacing)].active = YES; [self.heightAnchor constraintEqualToConstant:(bannerHeight + spacing)].active = YES;
[self.widthAnchor constraintEqualToConstant:(self.frame.size.width)].active = YES;
if(kaiAlign==0) {
[self.widthAnchor constraintEqualToConstant:(self.frame.size.width)].active = YES;
} else {
[self.widthAnchor constraintEqualToAnchor:blurPlatter.widthAnchor].active = YES;
}


} }



+ 4
- 2
KAIBatteryPlatter.mm View File

self.stack.heightConstraint.active = YES; self.stack.heightConstraint.active = YES;


} else { } else {
int height = (self.number * (bannerHeight + spacing));
if([self.superview.subviews count]>1) {
int height = (self.number * (bannerHeight + spacing));
if(kaiAlign==0 && [self.superview.subviews count]>1) {
height = (self.number * (bannerHeight + spacing)) - spacing; height = (self.number * (bannerHeight + spacing)) - spacing;
} else {
height = bannerHeight;
} }
self.heightConstraint.constant = height; self.heightConstraint.constant = height;
self.stack.heightConstraint.constant = height; self.stack.heightConstraint.constant = height;

Loading…
Cancel
Save