瀏覽代碼

vibeok

pull/1/head
Burrit0z 4 年之前
父節點
當前提交
f30b2c6954
共有 3 個檔案被更改,包括 15 行新增1 行删除
  1. +2
    -0
      KAIBatteryPlatter.mm
  2. +1
    -0
      Kai.h
  3. +12
    -1
      Kai.xm

+ 2
- 0
KAIBatteryPlatter.mm 查看文件

@@ -191,6 +191,8 @@ long long lastPercentage;

if(self.number==0) {
[(UIStackView *)(self.superview) removeArrangedSubview:self];
} else if(self.number!=0 && !self.superview) {
[[[objc_getClass("CSAdjunctListView") class] sharedListViewForKai] addArrangedSubview:self];
}
}


+ 1
- 0
Kai.h 查看文件

@@ -15,6 +15,7 @@
-(UIStackView *)stackView;
-(void)_layoutStackView;
-(void)setStackView:(UIStackView *)arg1;
+(id)sharedListViewForKai;
@end

@interface CALayer (kai)

+ 12
- 1
Kai.xm 查看文件

@@ -1,5 +1,7 @@
#import "Kai.h"

CSAdjunctListView *list;

%group main

%hook KAITarget //This class is defined in %ctor, KAITarget is not a class name.
@@ -15,7 +17,7 @@
//and insert into last slot.
[[self stackView] removeArrangedSubview:[KAIBatteryPlatter sharedInstance]];
[[self stackView] insertArrangedSubview:[KAIBatteryPlatter sharedInstance] atIndex:lastSlot];
} else if([[self stackView].subviews objectAtIndex:0] != [KAIBatteryPlatter sharedInstance] && !belowMusic) {
} else if(!belowMusic && ![[self stackView].subviews containsObject:[KAIBatteryPlatter sharedInstance]]) {
[[self stackView] removeArrangedSubview:[KAIBatteryPlatter sharedInstance]];
[[self stackView] insertArrangedSubview:[KAIBatteryPlatter sharedInstance] atIndex:0];
}
@@ -42,6 +44,9 @@
-(void)setStackView:(UIStackView *)arg1 {

if(!KAISelf.hasKai) {

list = self;

KAIBatteryPlatter *battery = [[KAIBatteryPlatter alloc] initWithFrame:[self stackView].frame];

//Add noti observer
@@ -92,6 +97,12 @@
}

}

%new
+(id)sharedListViewForKai {
return list;
}

%end



Loading…
取消
儲存