You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UIPanGestureRecognizer in Texture/AsyncDisplayKit's ASCellNode prevents the table from scrolling when implementing swipe to perform action type behaviour
#2074
Open
Pranoy1c opened this issue
Jan 19, 2023
· 1 comment
I am trying to implement "swipe to perform action" in a ASCellNode. The problem is that the UIPanGestureRecognizer prevents the table from scrolling.
I am able to successfully get this to work in UIKit using UITableViewCell but for some reason it's not working when using Texture's ASCellNode. I can demonstrate the issue easily with the ASDKgram example provided with this library which has both a UIKit example in one tab and Texture example in another tab:
This allows Panned! to print when panning horizontally but the table does not scroll at all. Why are they working differently? How can I make the table scroll when the touches are vertical?
The text was updated successfully, but these errors were encountered:
Pranoy1c
changed the title
UIPanGestureRecognizer in Texture/AsyncDisplayKit's ASCellNode prevents the table from scrolling
UIPanGestureRecognizer in Texture/AsyncDisplayKit's ASCellNode prevents the table from scrolling when implementing swipe to perform action type behaviour
Jan 20, 2023
I was able to solve it. Though I am not sure why the behavior is different between the UITableViewCell and ASCellNode. @appleguy can you help point out why the difference?
In the PhotoCellNode.m, I returned [super gestureRecognizerShouldBegin:gestureRecognizer] in gestureRecognizerShouldBegin and I also added the shouldRecognizeSimultaneouslyWithGestureRecognizer function:
I am using the Texture/AsyncDisplayKit library:
https://github.com/texturegroup/texture
I am trying to implement "swipe to perform action" in a
ASCellNode
. The problem is that theUIPanGestureRecognizer
prevents the table from scrolling.I am able to successfully get this to work in
UIKit
usingUITableViewCell
but for some reason it's not working when using Texture'sASCellNode
. I can demonstrate the issue easily with theASDKgram
example provided with this library which has both aUIKit
example in one tab andTexture
example in another tab:https://github.com/TextureGroup/Texture/tree/master/examples/ASDKgram
For the UIKit example, all I had to do was:
Add
<UIGestureRecognizerDelegate>
toPhotoTableViewCell.h
Add
UIPanGestureRecognizer *_panGestureRecognizer;
in the@implementation PhotoTableViewCell
Add following to the
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
:Add following:
This was enough to get it to print
Panned!
when panning horizontally and also let the UITableView scroll when it's vertical direction.The same does not work for the
PhotoCellNode
. I did the following:Add
<UIGestureRecognizerDelegate>
toPhotoCellNode.h
Add
UIPanGestureRecognizer *_panGestureRecognizer;
in the@implementation PhotoCellNode
Add following to the
PhotoCellNode.m
:This allows
Panned!
to print when panning horizontally but the table does not scroll at all. Why are they working differently? How can I make the table scroll when the touches are vertical?The text was updated successfully, but these errors were encountered: