objective c - Touch event forwarding in iOS -
I have a UI component that I display in my application, in this way that any touch event at all They want to dismiss it (though touching the component will give it a different result touching it out).
My current solution is a Custom UIWindow subclass that handles the touch properly and sits above the entire screen. However, I do not want to be intuitive to touch, but rather to forward any UI elements (ie I want to speed up something within the touch window, but still want the event with ideas behind the window Are).
By the way I had tried to forward touch events - [MyWindow sendEvent:]:
NSUInteger superWindowIndex = [[UIApplication sharedApplication] .windows indexOfObject: Self]; If (supervindoundx == 0+ supervaindexx == nsnoutfound) {[super send event: event]; } Else {[[UIApplication sharedApplication] .windows [superWindowIndex - 1] sendEvent: Event]; }
However, that did not work as I had hoped.
What is the best way to achieve what I am trying to do? Is UI window the right approach? Thanks!
to forward my solution to the touch, but see another that the cover does not include its UI components After all the UIWindow, you can add the Tap Gastrer to the outside area of your main UI
Comments
Post a Comment