Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with swipe to delete cell gesture. #trivial #46

Merged
merged 1 commit into from
Apr 29, 2017

Conversation

rewcraig
Copy link
Contributor

Ensure superclass scroll view delegate methods are called when the scroll view parameter is not the current ASTableView.

Fixes #38

@CLAassistant
Copy link

CLAassistant commented Apr 20, 2017

CLA assistant check
All committers have signed the CLA.

@garrettmoon
Copy link
Member

@rewcraig can you rebase this please to fix the build failure? (sorry CI should have posted it, looking into why it didn't)

@rewcraig rewcraig force-pushed the swipetodelete branch 2 times, most recently from 810da7b to 5c8a28e Compare April 21, 2017 13:41
@rewcraig rewcraig changed the title Fix issue with swipe to delete cell gesture. Fix issue with swipe to delete cell gesture. #trivial Apr 24, 2017
@ghost
Copy link

ghost commented Apr 27, 2017

🚫 CI failed with log

@ghost
Copy link

ghost commented Apr 27, 2017

🚫 CI failed with log

@garrettmoon
Copy link
Member

@rewcraig I don't think this failure is your fault, I've put up a fix and will let you know when it's in master. Thanks for sticking with us :)

@garrettmoon
Copy link
Member

Fix landed in master if you don't mind rebasing.

@rewcraig
Copy link
Contributor Author

No trouble at all.

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice implementation! One note.

superResponds = [UITableView instancesRespondToSelector:_cmd]; \
}); \
return superResponds; \
}()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Rather than specifying this as a block, let's just make it a scope:

#define UITABLEVIEW_RESPONDS_TO_SELECTOR() \
  ({ \
    static BOOL superResponds; \
    static dispatch_once_t onceToken; \
    dispatch_once(&onceToken, ^{ \
      superResponds = [UITableView instancesRespondToSelector:_cmd]; \
    }); \
    superResponds; \
  })

Ensure superclass scroll view delegate methods are called when the scroll view parameter is not the current ASTableView.
@rewcraig
Copy link
Contributor Author

I knew there must be some way to build that macro without a block. Much better!

@Adlai-Holler Adlai-Holler merged commit e18d139 into TextureGroup:master Apr 29, 2017
@appleguy
Copy link
Member

appleguy commented Feb 8, 2018

@rewcraig This would be needed for ASCollectionView too right?

@rewcraig
Copy link
Contributor Author

rewcraig commented Feb 8, 2018

I have not tried this with ASCollectionView. However, from what I can tell UICollectionView does not implement any of the UIScrollViewDelegate methods. Are you seeing evidence to suggest ASCollectionView suffers from a similar issue? I'd be happy to help in any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants