Hi Jean-Baptiste,
it has been quite a while in this area. But finally I found a way to change ios.m (in general) without breaking existing use cases in order to fix this topic. Actually building libVLC and VLCKit from source was troublesome here and then...
Idea is, that before the UITapGestureRecognizer gets initialized the code checks, if the parent UIViewController has implemented the tapRecognized: selector. If it does, the internal gesture recognizer is not set up, if not the code behaves as before. In order to disable libVLC/VLCKit swallowing UITapGesture, the UIViewController just needs to implement a dummy method like this:
Code: Select all
- (void)tapRecognized:(UITapGestureRecognizer *)tapRecognizer {
(void)tapRecognizer;
}
The method never gets called - it just needs to be implemented. OK, this is likely some sort of "hack".I used this one, basically, because the compiler already knows the selector for this method as there is a implementation of it in the same file.
It would be better to check for another method like: -(BOOL)wantsTapGestures- which could even go into the VLCKitDelegate protocol as optional. When it is not implemented or returns NO libvlc behaves as before - if present and returning YES, the internal UITapGesture Recognizer is not set up. But that is on top work and we could elaborate from my patch I would like to share with you.
I tried to send it directly to vlc-devel mailing list, but the email I am registered there does not allow sending (it is just an alias). I can send the patch via mail directly to you, I already it to Felix.
BTW: the patch also fixes small ambiguities that in very rare cases may lead to over-released or over-retained objects - either dangling pointers or memory leaks - but really very rare corner cases...
Let me know if interested!!