Skip to content

Implemented UIPanGestureRecognizer for positionBar#65

Open
anovoselskyi wants to merge 2 commits intoHHK1:masterfrom
anovoselskyi:master
Open

Implemented UIPanGestureRecognizer for positionBar#65
anovoselskyi wants to merge 2 commits intoHHK1:masterfrom
anovoselskyi:master

Conversation

@anovoselskyi
Copy link
Copy Markdown

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

@SergeyZalozniy
Copy link
Copy Markdown

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
Copy Markdown
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