From: Mickael B. <mba...@gm...> - 2012-06-12 06:16:34
|
Hi everyone, Hope you're having a good day right now :) I have some questions about touches events handling. I just made a few tests in the last few days and I just wanted to ask you some details : (FYI, I'm using the C backend) - I tried to add UITouch events handling on a regular UIView class. I had no success. Then, I tried to debug the MultiTouch tutorial provided example and this time, it worked successfully on my iPhone. I couldn't find what was wrong on my code, but after many tests, I achieved to make it receive events correctly. It seems that, if you don't implement "drawRect(CGRect)" inside your class extending UIView, then your class will never receive UITouch events. Well, you simply have to add this method in your class, even if it does nothing (you can delete the complete body of this method, it will still work). Why is it necessary to add this method inside your UIView subclass in order to receive UITouch events ? It seems that this is not needed on the iOS official SDK implementation, so maybe you could answer this question. - I then tried to add UITouch events handling on a UIViewGL subclass. I still had no success at this time, after many tests. I tried almost everything, but couldn't make it receive touch events. Do you have any idea about how to make it work correctly, or at least, a starting point where to search for what's going on ? My lastest tests made me believe it could be a problem with the UIViewWrapper / UIViewGLWrapper implementations, but couldn't go further than this. Any idea ? Thank you so much for your appreciated help ! Mikael |