[MediaWiki-commits] [Gerrit] Long press back or forward buttons brings up history. - change (apps...wikipedia)

2014-10-03 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Long press back or forward buttons brings up history.
..


Long press back or forward buttons brings up history.

Change-Id: Id759908b66a6318f7a650af36ae57411cb04eb4d
---
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
1 file changed, 25 insertions(+), 3 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m
index d326973..16ad0c4 100644
--- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
+++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
@@ -104,11 +104,24 @@
 
 [self addTapRecognizersToAllButtons];
 
-UILongPressGestureRecognizer *longPressRecognizer =
+UILongPressGestureRecognizer *saveLongPressRecognizer =
 [[UILongPressGestureRecognizer alloc] initWithTarget: self
   action: 
@selector(saveButtonLongPressed:)];
-longPressRecognizer.minimumPressDuration = 0.5f;
-[self.saveButton addGestureRecognizer:longPressRecognizer];
+saveLongPressRecognizer.minimumPressDuration = 0.5f;
+[self.saveButton addGestureRecognizer:saveLongPressRecognizer];
+
+UILongPressGestureRecognizer *backLongPressRecognizer =
+[[UILongPressGestureRecognizer alloc] initWithTarget: self
+  action: 
@selector(backForwardButtonsLongPressed:)];
+backLongPressRecognizer.minimumPressDuration = 0.5f;
+[self.backButton addGestureRecognizer:backLongPressRecognizer];
+
+
+UILongPressGestureRecognizer *forwardLongPressRecognizer =
+[[UILongPressGestureRecognizer alloc] initWithTarget: self
+  action: 
@selector(backForwardButtonsLongPressed:)];
+forwardLongPressRecognizer.minimumPressDuration = 0.5f;
+[self.forwardButton addGestureRecognizer:forwardLongPressRecognizer];
 
 [self adjustConstraintsScaleForViews:@[self.backButton, 
self.forwardButton, self.saveButton, self.rightButton]];
 }
@@ -172,6 +185,15 @@
 }
 }
 
+-(void)backForwardButtonsLongPressed:(UILongPressGestureRecognizer *)recognizer
+{
+if (recognizer.state == UIGestureRecognizerStateBegan){
+[self performModalSequeWithID: @modal_segue_show_history
+  transitionStyle: UIModalTransitionStyleCoverVertical
+block: nil];
+}
+}
+
 - (void)shareButtonPushed
 {
 NSString *title = @;

-- 
To view, visit https://gerrit.wikimedia.org/r/164495
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id759908b66a6318f7a650af36ae57411cb04eb4d
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd mh...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Long press back or forward buttons brings up history. - change (apps...wikipedia)

2014-10-02 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/164495

Change subject: Long press back or forward buttons brings up history.
..

Long press back or forward buttons brings up history.

Change-Id: Id759908b66a6318f7a650af36ae57411cb04eb4d
---
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
1 file changed, 25 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/95/164495/1

diff --git a/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m
index d326973..16ad0c4 100644
--- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
+++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
@@ -104,11 +104,24 @@
 
 [self addTapRecognizersToAllButtons];
 
-UILongPressGestureRecognizer *longPressRecognizer =
+UILongPressGestureRecognizer *saveLongPressRecognizer =
 [[UILongPressGestureRecognizer alloc] initWithTarget: self
   action: 
@selector(saveButtonLongPressed:)];
-longPressRecognizer.minimumPressDuration = 0.5f;
-[self.saveButton addGestureRecognizer:longPressRecognizer];
+saveLongPressRecognizer.minimumPressDuration = 0.5f;
+[self.saveButton addGestureRecognizer:saveLongPressRecognizer];
+
+UILongPressGestureRecognizer *backLongPressRecognizer =
+[[UILongPressGestureRecognizer alloc] initWithTarget: self
+  action: 
@selector(backForwardButtonsLongPressed:)];
+backLongPressRecognizer.minimumPressDuration = 0.5f;
+[self.backButton addGestureRecognizer:backLongPressRecognizer];
+
+
+UILongPressGestureRecognizer *forwardLongPressRecognizer =
+[[UILongPressGestureRecognizer alloc] initWithTarget: self
+  action: 
@selector(backForwardButtonsLongPressed:)];
+forwardLongPressRecognizer.minimumPressDuration = 0.5f;
+[self.forwardButton addGestureRecognizer:forwardLongPressRecognizer];
 
 [self adjustConstraintsScaleForViews:@[self.backButton, 
self.forwardButton, self.saveButton, self.rightButton]];
 }
@@ -172,6 +185,15 @@
 }
 }
 
+-(void)backForwardButtonsLongPressed:(UILongPressGestureRecognizer *)recognizer
+{
+if (recognizer.state == UIGestureRecognizerStateBegan){
+[self performModalSequeWithID: @modal_segue_show_history
+  transitionStyle: UIModalTransitionStyleCoverVertical
+block: nil];
+}
+}
+
 - (void)shareButtonPushed
 {
 NSString *title = @;

-- 
To view, visit https://gerrit.wikimedia.org/r/164495
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id759908b66a6318f7a650af36ae57411cb04eb4d
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd mh...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits