Closed Bug 1152880 Opened 9 years ago Closed 9 years ago

Refactor LongPressGestureRecognizer to make it Swift 1.2 compatible

Categories

(Firefox for iOS :: Browser, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fennec + ---

People

(Reporter: st3fan, Assigned: st3fan)

References

Details

The LongPressGestureRecognizer is difficult to make Swift 1.2 compatible because of the way it's initializers are organized.

When looking at the code I realized that there actually is way too much logic in the UIGestureRecognizer subclass: the only thing it should do is captire the long press and then fire a delegate so that the BVC can handle it.

So I think it is best to refactor this code a bit and kill two bugs with one stone. Not a rewrite, just reorganize the code a bit.

Setting tracking-fennec because this needs to be done for the Swift 1.2 move.
Blocks: 1152609
OS: Mac OS X → iOS 8
Hardware: x86 → All
Status: NEW → ASSIGNED
Just a quick note about the code: I was able to get rid of the UIGestureRecognizer subclass completely. All code is now contained in a BrowserHelper which emits a delegate callback to the BVC which handles showing the actual action sheet.
https://github.com/mozilla/firefox-ios/commit/2b60f9547461f0196f68e9a79471d4ea91938cd1
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.