diff options
author | Dustin L. Howett <dustin@howett.net> | 2010-12-02 07:23:34 -0500 |
---|---|---|
committer | Dustin L. Howett <dustin@howett.net> | 2010-12-02 07:23:34 -0500 |
commit | 773cfc9fe369c16d5b47aa14260b8a5d172faac0 (patch) | |
tree | a6548e4a9e3669ee846b6be96b8257d86bd0e893 /MobileCydia.mm | |
parent | 540437033286aa962b940cefac84686abf6d9ffa (diff) |
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.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 5c12b8b..196b9c0 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 { |