Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: ios/chrome/browser/ui/side_swipe_gesture_recognizer.h

Issue 1137623007: [iOS] Upstream changes to swipe recognizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_
6 #define IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_ 6 #define IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_
7 7
8 #import <UIKit/UIGestureRecognizerSubclass.h> 8 #import <UIKit/UIGestureRecognizerSubclass.h>
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
11 // This gesture recognizer is used because the default swipe gesture recognizer 11 // This gesture recognizer is used because the default swipe gesture recognizer
12 // is too restrictive. The default swipe requires a particular velocity and 12 // is too restrictive. The default swipe requires a particular velocity and
13 // distance that Chrome does not require. 13 // distance that Chrome does not require.
14 // Another benefit of using a custom gesture recognizer is it can fail faster, 14 // Another benefit of using a custom gesture recognizer is it can fail faster,
15 // so recognizers that depend on this recognizer can begin faster. 15 // so recognizers that depend on this recognizer can begin faster.
16 @interface SideSwipeGestureRecognizer : UIPanGestureRecognizer 16 @interface SideSwipeGestureRecognizer : UIPanGestureRecognizer
17 17
18 // The distance from the edge of the screen in which a side swipe can start. 18 // The distance from the edge of the screen in which a side swipe can start.
19 @property(nonatomic, assign) CGFloat swipeEdge; 19 @property(nonatomic, assign) CGFloat swipeEdge;
20 // The distance from the edge of the screen from which a gesture starts. 20 // The distance from the edge of the screen from which a gesture starts.
21 @property(readonly, nonatomic) CGFloat swipeOffset; 21 @property(readonly, nonatomic) CGFloat swipeOffset;
22 // Starting point of swipe.
23 @property(readonly, nonatomic) CGPoint startPoint;
22 @property(nonatomic, assign) UISwipeGestureRecognizerDirection direction; 24 @property(nonatomic, assign) UISwipeGestureRecognizerDirection direction;
23 25
24 @end 26 @end
25 27
26 #endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_ 28 #endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698