From a2e795839966b40d680b2221d965c1efa026e935 Mon Sep 17 00:00:00 2001 From: Burrit0z Date: Tue, 2 Jun 2020 20:21:03 -0400 Subject: [PATCH] fix being scrollable/not scrollable at wrong times --- KAIBatteryPlatter.mm | 3 ++- KAIStackView.mm | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/KAIBatteryPlatter.mm b/KAIBatteryPlatter.mm index b2f1474..0643caf 100755 --- a/KAIBatteryPlatter.mm +++ b/KAIBatteryPlatter.mm @@ -16,6 +16,7 @@ NSTimer *queueTimer = nil; self.stack.alignment = 0; self.oldCountOfDevices = -100; self.queued = NO; + self.clipsToBounds = NO; [self setMinimumZoomScale:1]; [self setMaximumZoomScale:1]; @@ -115,6 +116,7 @@ long long lastPercentage; } -(void)setContentOffset:(CGPoint)arg1 { + [self setContentSize:self.stack.frame.size]; [super setContentOffset:CGPointMake(arg1.x, 0)]; } @@ -143,7 +145,6 @@ long long lastPercentage; UIStackView *s = (UIStackView *)(self.superview); s.frame = CGRectMake(s.frame.origin.x, s.frame.origin.y, s.frame.size.width, (s.frame.size.height - 1)); //literally does nothing but makes the stack view lay itself out (doesnt adjust frame because translatesAutoreszingMaskIntoConstraints = NO on stack views) - [self setContentSize:self.stack.frame.size]; } }]; diff --git a/KAIStackView.mm b/KAIStackView.mm index e30ba24..92677d0 100644 --- a/KAIStackView.mm +++ b/KAIStackView.mm @@ -8,4 +8,9 @@ return self; } +-(void)addSubview:(UIView *)arg1 { + [super addSubview:arg1]; + [(UIScrollView *)self.superview setContentSize:self.frame.size]; +} + @end \ No newline at end of file