|
|
|
|
|
|
|
|
#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 |
|
|
|
|
|
|
|
|
|
|
|
|