Browse Source

vibeok

pull/1/head
Burrit0z 4 years ago
parent
commit
f30b2c6954
3 changed files with 15 additions and 1 deletions
  1. +2
    -0
      KAIBatteryPlatter.mm
  2. +1
    -0
      Kai.h
  3. +12
    -1
      Kai.xm

+ 2
- 0
KAIBatteryPlatter.mm View File



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



+ 1
- 0
Kai.h View File

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


@interface CALayer (kai) @interface CALayer (kai)

+ 12
- 1
Kai.xm View File

#import "Kai.h" #import "Kai.h"


CSAdjunctListView *list;

%group main %group main


%hook KAITarget //This class is defined in %ctor, KAITarget is not a class name. %hook KAITarget //This class is defined in %ctor, KAITarget is not a class name.
//and insert into last slot. //and insert into last slot.
[[self stackView] removeArrangedSubview:[KAIBatteryPlatter sharedInstance]]; [[self stackView] removeArrangedSubview:[KAIBatteryPlatter sharedInstance]];
[[self stackView] insertArrangedSubview:[KAIBatteryPlatter sharedInstance] atIndex:lastSlot]; [[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] removeArrangedSubview:[KAIBatteryPlatter sharedInstance]];
[[self stackView] insertArrangedSubview:[KAIBatteryPlatter sharedInstance] atIndex:0]; [[self stackView] insertArrangedSubview:[KAIBatteryPlatter sharedInstance] atIndex:0];
} }
-(void)setStackView:(UIStackView *)arg1 { -(void)setStackView:(UIStackView *)arg1 {


if(!KAISelf.hasKai) { if(!KAISelf.hasKai) {

list = self;

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


//Add noti observer //Add noti observer
} }


} }

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

%end %end





Loading…
Cancel
Save