HHK1 / PryntTrimmerView

A set of tools to trim, crop and select frames inside a video
MIT License
835 stars 199 forks source link

Implemented UIPanGestureRecognizer for positionBar #65

Open anovoselskyi opened 4 years ago

anovoselskyi commented 4 years ago

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

SergeyZalozniy commented 4 years ago

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 commented 4 years ago

@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