Brion VIBBER has submitted this change and it was merged.
Change subject: Scrolling description text now pre-empts scrolling details view.
......................................................................
Scrolling description text now pre-empts scrolling details view.
Change-Id: I7e937f81949d75c6870dedd727785997bb795243
---
M Commons-iOS/DetailScrollViewController.h
M Commons-iOS/DetailScrollViewController.m
2 files changed, 16 insertions(+), 1 deletion(-)
Approvals:
Brion VIBBER: Verified; Looks good to me, approved
diff --git a/Commons-iOS/DetailScrollViewController.h
b/Commons-iOS/DetailScrollViewController.h
index bb62569..021e941 100644
--- a/Commons-iOS/DetailScrollViewController.h
+++ b/Commons-iOS/DetailScrollViewController.h
@@ -20,7 +20,7 @@
@property (weak, nonatomic) UIView *view;
@end
-@interface DetailScrollViewController : UIViewController <UITextFieldDelegate,
UITextViewDelegate, UIGestureRecognizerDelegate>
+@interface DetailScrollViewController : UIViewController <UITextFieldDelegate,
UITextViewDelegate, UIGestureRecognizerDelegate, UIScrollViewDelegate>
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UITextField *titleTextField;
diff --git a/Commons-iOS/DetailScrollViewController.m
b/Commons-iOS/DetailScrollViewController.m
index f3db0fd..ebb5b99 100644
--- a/Commons-iOS/DetailScrollViewController.m
+++ b/Commons-iOS/DetailScrollViewController.m
@@ -1394,6 +1394,21 @@
}
}
+#pragma mark - Description UITextView scrolling
+
+// When the description has the focus and the user is scrolling through the
description
+// text (once the amount of text causes the description box to scroll)
temporarily
+// disable scrolling of the details slider or both scroll at once, which is
weird.
+- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
+{
+ detailsPanRecognizer_.enabled = NO;
+}
+
+- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView
withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint
*)targetContentOffset
+{
+ detailsPanRecognizer_.enabled = YES;
+}
+
#pragma mark - Details scrolling
-(void)scrollByAmount:(float)amount withDuration:(NSTimeInterval)duration
delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options
useXF:(BOOL)useXF then:(void(^)(void))block
--
To view, visit https://gerrit.wikimedia.org/r/90172
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7e937f81949d75c6870dedd727785997bb795243
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/commons
Gerrit-Branch: master
Gerrit-Owner: Mhurd <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits