diff --git a/KAIBatteryStack.mm b/KAIBatteryStack.mm index f06f2ff..e549343 100644 --- a/KAIBatteryStack.mm +++ b/KAIBatteryStack.mm @@ -125,7 +125,9 @@ long long lastPercentage; } }]; - + if([self.superview.superview.superview respondsToSelector:@selector(fixComplicationsViewFrame)]) { + [(NCNotificationListView *)(self.superview.superview.superview) fixComplicationsViewFrame]; + } }); } @@ -133,6 +135,9 @@ long long lastPercentage; -(void)addArrangedSubview:(UIView *)view { [super addArrangedSubview:view]; self.number = [self.subviews count]; + if([self.superview.superview.superview respondsToSelector:@selector(fixComplicationsViewFrame)]) { + [(NCNotificationListView *)(self.superview.superview.superview) fixComplicationsViewFrame]; + } [UIView animateWithDuration:0.3 animations:^{ @@ -173,6 +178,9 @@ long long lastPercentage; -(void)removeArrangedSubview:(UIView *)view { [super removeArrangedSubview:view]; self.number = [self.subviews count]; + if([self.superview.superview.superview respondsToSelector:@selector(fixComplicationsViewFrame)]) { + [(NCNotificationListView *)(self.superview.superview.superview) fixComplicationsViewFrame]; + } [UIView animateWithDuration:0.3 animations:^{ diff --git a/Kai.h b/Kai.h index 5c97707..304ab54 100644 --- a/Kai.h +++ b/Kai.h @@ -30,6 +30,11 @@ -(id)sf_udidString; -(id)_currentProduct; @end + +@interface NCNotificationListView : UIView +-(void)fixComplicationsViewFrame; +@end + BOOL isUpdating = NO; //prefs