From: Dustin L. Howett Date: Thu, 2 Dec 2010 12:23:34 +0000 (-0500) Subject: Fix the automatic scrolling - UIKit no longer likes 0-height rects :(. Only auto... X-Git-Tag: v1.1.0%b1~434 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/773cfc9fe369c16d5b47aa14260b8a5d172faac0 Fix the automatic scrolling - UIKit no longer likes 0-height rects :(. Only auto-scroll if we're within 20pt of the bottom of the output, so the user can scroll back in the middle of an operation. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 5c12b8b1..196b9c02 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4674,8 +4674,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) _addProgressOutput:(NSString *)output { [output_ setText:[NSString stringWithFormat:@"%@\n%@", [output_ text], output]]; CGSize size = [output_ contentSize]; - CGRect rect = {{0, size.height}, {size.width, 0}}; - [output_ scrollRectToVisible:rect animated:YES]; + CGPoint offset = [output_ contentOffset]; + if (size.height - offset.y < [output_ frame].size.height + 20.f) { + CGRect rect = {{0, size.height-1}, {size.width, 1}}; + [output_ scrollRectToVisible:rect animated:YES]; + } } - (BOOL) isRunning {