File tree Expand file tree Collapse file tree 6 files changed +31
-7
lines changed
Vendor/ECSlidingViewController Expand file tree Collapse file tree 6 files changed +31
-7
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,12 @@ - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceO
46
46
47
47
- (IBAction )revealMenu : (id )sender
48
48
{
49
- [self .slidingViewController anchorTopViewTo: ECRight animations: nil onComplete: nil ];
49
+ [self .slidingViewController anchorTopViewTo: ECRight];
50
50
}
51
51
52
52
- (IBAction )revealUnderRight : (id )sender
53
53
{
54
- [self .slidingViewController anchorTopViewTo: ECLeft animations: nil onComplete: nil ];
54
+ [self .slidingViewController anchorTopViewTo: ECLeft];
55
55
}
56
56
57
57
@end
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
40
40
41
41
- (IBAction )revealMenu : (id )sender
42
42
{
43
- [self .slidingViewController anchorTopViewTo: ECRight animations: nil onComplete: nil ];
43
+ [self .slidingViewController anchorTopViewTo: ECRight];
44
44
}
45
45
46
46
- (BOOL )shouldAutorotateToInterfaceOrientation : (UIInterfaceOrientation)toInterfaceOrientation
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ - (void)viewWillAppear:(BOOL)animated
26
26
27
27
- (IBAction )revealMenu : (id )sender
28
28
{
29
- [self .slidingViewController anchorTopViewTo: ECRight animations: nil onComplete: nil ];
29
+ [self .slidingViewController anchorTopViewTo: ECRight];
30
30
}
31
31
32
32
@end
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ - (void)viewWillAppear:(BOOL)animated
53
53
54
54
- (IBAction )revealMenu : (id )sender
55
55
{
56
- [self .slidingViewController anchorTopViewTo: ECRight animations: nil onComplete: nil ];
56
+ [self .slidingViewController anchorTopViewTo: ECRight];
57
57
}
58
58
59
59
// slidingViewController notification
Original file line number Diff line number Diff line change @@ -118,6 +118,14 @@ typedef enum {
118
118
*/
119
119
- (UIPanGestureRecognizer *)panGesture ;
120
120
121
+ /* * Slides the top view in the direction of the specified side.
122
+
123
+ A peek amount or reveal amount must be set for the given side. The top view will anchor to one of those specified values.
124
+
125
+ @param side The side for the top view to slide towards.
126
+ */
127
+ - (void )anchorTopViewTo : (ECSide)side ;
128
+
121
129
/* * Slides the top view in the direction of the specified side.
122
130
123
131
A peek amount or reveal amount must be set for the given side. The top view will anchor to one of those specified values.
@@ -128,6 +136,12 @@ typedef enum {
128
136
*/
129
137
- (void )anchorTopViewTo : (ECSide)side animations : (void (^)())animations onComplete : (void (^)())complete ;
130
138
139
+ /* * Slides the top view off of the screen in the direction of the specified side.
140
+
141
+ @param side The side for the top view to slide off the screen towards.
142
+ */
143
+ - (void )anchorTopViewOffScreenTo : (ECSide)side ;
144
+
131
145
/* * Slides the top view off of the screen in the direction of the specified side.
132
146
133
147
@param side The side for the top view to slide off the screen towards.
Original file line number Diff line number Diff line change @@ -185,9 +185,9 @@ - (void)updateTopViewHorizontalCenterWithRecognizer:(UIPanGestureRecognizer *)re
185
185
CGFloat currentVelocityX = currentVelocityPoint.x ;
186
186
187
187
if ([self underLeftShowing ] && currentVelocityX > 100 ) {
188
- [self anchorTopViewTo: ECRight animations: nil onComplete: nil ];
188
+ [self anchorTopViewTo: ECRight];
189
189
} else if ([self underRightShowing ] && currentVelocityX < 100 ) {
190
- [self anchorTopViewTo: ECLeft animations: nil onComplete: nil ];
190
+ [self anchorTopViewTo: ECLeft];
191
191
} else {
192
192
[self resetTopView ];
193
193
}
@@ -199,6 +199,11 @@ - (UIPanGestureRecognizer *)panGesture
199
199
return _panGesture;
200
200
}
201
201
202
+ - (void )anchorTopViewTo : (ECSide)side
203
+ {
204
+ [self anchorTopViewTo: side animations: nil onComplete: nil ];
205
+ }
206
+
202
207
- (void )anchorTopViewTo : (ECSide)side animations : (void (^)())animations onComplete : (void (^)())complete
203
208
{
204
209
CGFloat newCenter = self.topView .center .x ;
@@ -234,6 +239,11 @@ - (void)anchorTopViewTo:(ECSide)side animations:(void (^)())animations onComplet
234
239
}];
235
240
}
236
241
242
+ - (void )anchorTopViewOffScreenTo : (ECSide)side
243
+ {
244
+ [self anchorTopViewOffScreenTo: side animations: nil onComplete: nil ];
245
+ }
246
+
237
247
- (void )anchorTopViewOffScreenTo : (ECSide)side animations : (void (^)())animations onComplete : (void (^)())complete
238
248
{
239
249
CGFloat newCenter = self.topView .center .x ;
You can’t perform that action at this time.
0 commit comments