Device battery indicators on your Lock Screen
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

KAIStackView.mm 1.1KB

pirms 4 gadiem
pirms 4 gadiem
pirms 4 gadiem
pirms 4 gadiem
pirms 4 gadiem
pirms 4 gadiem
12345678910111213141516171819202122232425262728293031323334
  1. #import "KAIStackView.h"
  2. @implementation KAIStackView
  3. -(id)initWithFrame:(CGRect)arg1 {
  4. self = [super initWithFrame:arg1];
  5. self.translatesAutoresizingMaskIntoConstraints = NO;
  6. return self;
  7. }
  8. -(void)addSubview:(UIView *)view {
  9. [super addSubview:view];
  10. [(UIScrollView *)self.superview.superview setContentSize:self.frame.size];
  11. if(textColor==0 && [view respondsToSelector:@selector(updateInfo)]) {
  12. KAIBatteryCell *cell = (KAIBatteryCell *)view;
  13. if(@available(iOS 12.0, *)) {
  14. if(self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
  15. [cell.label setTextColor:[UIColor whiteColor]];
  16. [cell.percentLabel setTextColor:[UIColor whiteColor]];
  17. } else if(self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleLight) {
  18. [cell.label setTextColor:[UIColor blackColor]];
  19. [cell.percentLabel setTextColor:[UIColor blackColor]];
  20. }
  21. }
  22. }
  23. }
  24. -(void)layoutSubviews {
  25. [super layoutSubviews];
  26. [(KAIBatteryPlatter *)(self.superview.superview) calculateHeight];
  27. }
  28. @end