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

Implemented UIPanGestureRecognizer for positionBar #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

anovoselskyi
Copy link

Implemented positionBar moving to make ability easily seek within the selected ranges to see what content you have selected to trim

@SergeyZalozniy
Copy link

3px is too narrow for any gesture recognizer. (Apple recommends minimum 32px)
It will be good to add extra code:
public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { let frame = positionBar.frame.insetBy(dx: -32, dy: 0) if frame.contains(point) { return positionBar } return super.hitTest(point, with: event) }

@anovoselskyi
Copy link
Author

@SergeyZalozniy I agree with you, also from doc the func insetBy(::) adjusting the size of rect by (2dx,2dy), so let frame = positionBar.frame.insetBy(dx: -15, dy: 0) will be most closer to the 32px

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.

2 participants