Skip to content

Commit 42a15ac

Browse files
committed
minor fixes after code review
1 parent 1ed23e5 commit 42a15ac

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

YALContextMenu/YALContextMenuTableView.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ typedef NS_ENUM(NSInteger, MenuItemsAppearanceDirection) {
4444
/*! @abstract animationDuration time for animation in seconds*/
4545
@property (nonatomic) CGFloat animationDuration;
4646

47-
/*! The side of the screen to which menu items are related(For example, if 'right' chosen then first cell will be opened from right to left and counterclockwise and menu will be closed clockwise). Default - Right.*/
47+
/*! The side of the screen to which menu items are related.
48+
When it set to 'Right' the first cell will be opened from right to left and selected cell will be closed from left to right.
49+
When it set to 'Left' the first cell will be opened from left to right and selected cell will be closed from right to left.
50+
Default - Right.*/
4851
@property (nonatomic) MenuItemsSide menuItemsSide;
4952

50-
/*! @abstract Direction if menu item appearence. Default - FromTopToBottom.*/
53+
/*! Direction of menu item appearence. Default - FromTopToBottom.*/
5154
@property (nonatomic) MenuItemsAppearanceDirection menuItemsAppearanceDirection;
5255

5356
/*!

YALContextMenu/YALContextMenuTableView.m

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,14 @@ - (void)dismissBottomCells {
197197
cell:hidingCell
198198
animated:YES
199199
direction:self.menuItemsAppearanceDirection == FromBottomToTop ? bottom : top
200-
clockwise:self.menuItemsAppearanceDirection == FromBottomToTop ? YES : NO completion:^(BOOL completed) {
201-
if (completed) {
202-
[self.bottomCells removeLastObject];
203-
[self dismissBottomCells];
204-
[self shouldDismissSelf];
205-
}
206-
}];
200+
clockwise:self.menuItemsAppearanceDirection == FromBottomToTop ? YES : NO
201+
completion:^(BOOL completed) {
202+
if (completed) {
203+
[self.bottomCells removeLastObject];
204+
[self dismissBottomCells];
205+
[self shouldDismissSelf];
206+
}
207+
}];
207208
}
208209
}
209210

@@ -214,13 +215,14 @@ - (void)dismissTopCells {
214215
cell:hidingCell
215216
animated:YES
216217
direction:self.menuItemsAppearanceDirection == FromBottomToTop ? top : bottom
217-
clockwise:self.menuItemsAppearanceDirection == FromBottomToTop ? NO : YES completion:^(BOOL completed) {
218-
if (completed) {
219-
[self.topCells removeObjectAtIndex:0];
220-
[self dismissTopCells];
221-
[self shouldDismissSelf];
222-
}
223-
}];
218+
clockwise:self.menuItemsAppearanceDirection == FromBottomToTop ? NO : YES
219+
completion:^(BOOL completed) {
220+
if (completed) {
221+
[self.topCells removeObjectAtIndex:0];
222+
[self dismissTopCells];
223+
[self shouldDismissSelf];
224+
}
225+
}];
224226
}
225227
}
226228

0 commit comments

Comments
 (0)