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

Events & Scroll conflict revisited #12

Merged
merged 2 commits into from Oct 15, 2015
Merged

Events & Scroll conflict revisited #12

merged 2 commits into from Oct 15, 2015

Conversation

kaandedeoglu
Copy link
Contributor

Hello it's me again :)

I noticed some unwanted behavior when integrating ActiveLabel in UICollectionViewCell instances. There were 2 problems:

  • Tapping on a URL (or mention or hashtag) would call urlTapHandler, but would immediately trigger the - collectionView:didSelectItemAtIndexPath: delegate method - which can cause unwanted side effects - such as pushing a new ViewController etc.
  • Starting touches on a URL (or mention or hashtag), then scrolling the collection view up / down would not stop urlTapHandler from firing when the touches end (because the touch is always on the label while scrolling), even when UICollectionView has canCancelContentTouches turned on. This is very unpleasant and different from how - say - UIButton works in a UICollectionViewCell.

I know the changes that caused these are related to #3 - To be fair same problems demonstrated in the video can also occur while using a UIButton in a TableView/CollectionView as well - when canCancelContentTouches and delaysContentTouches are set incorrectly.

I chose to solve these problems by overriding more UIGestureRecognizerDelegate methods - and have our UILongPressGestureRecognizer fail when the user scrolls.

I'm working on a single case scenario with ActiveLabel, so I'm not 100% sure (but pretty sure) if this will not break things for anyone.

Please just let me know if you don't want to merge this, so I can switch to using my own fork in the project.

Thank you

Merge master into kaandedeoglu/ActiveLabel
…n UICollectionView & UITableView (UIScrollView subclasses)
@schickling
Copy link
Contributor

Thanks so much for your efforts @kaandedeoglu to improve ActiveLabel!

@weiFans could you please check if this also works for your use cases?

@gaohomway
Copy link

@schickling Thank you for reminding me, English is not very good, I did not understand what the problem solving @kaandedeoglu

@kaandedeoglu
Copy link
Contributor Author

@weiFans Can you please try if the latest changes in this pull branch breaks anything for you.

@gaohomway
Copy link

@kaandedeoglu I do not have to use, not to solve the custom hyperlink, such as my description #7

@kaandedeoglu
Copy link
Contributor Author

@schickling Any news on this?

schickling added a commit that referenced this pull request Oct 15, 2015
Events & Scroll conflict revisited
@schickling schickling merged commit 4c03f87 into optonaut:master Oct 15, 2015
@kaandedeoglu
Copy link
Contributor Author

Thank you! I've more coming if you're okay with it.

Also, I think you're forgetting to publish new Cocoapods versions - can you please do pod trunk push to make sure they come through?

@schickling
Copy link
Contributor

I'd love to see that @kaandedeoglu!

About Cocoapods: We're not using Cocoapods at Optonaut so I'm not familiar with the process. Isn't updating the podspec file enough?

@kaandedeoglu
Copy link
Contributor Author

Nope - you have a cd to the directory and do pod push trunk https://guides.cocoapods.org/making/getting-setup-with-trunk.html :)

@schickling
Copy link
Contributor

I'm getting [!] You are not allowed to push new versions for this pod.

I guess somebody else already claimed ownership?

@kaandedeoglu
Copy link
Contributor Author

Yep - Lasha Efremidze <efremidzel@hotmail.com> seems to be owner ( pod trunk info ActiveLabel )

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

3 participants