iOS - Proper way to check UIEvent or UInternalEvent
iOS - Proper way to check UIEvent or UInternalEvent
- Subject: iOS - Proper way to check UIEvent or UInternalEvent
- From: Alex Zavatone <email@hidden>
- Date: Tue, 23 Jun 2015 15:54:12 -0400
I'm running into an interesting exception being thrown by a watcher class that pipes events around before they get to the expected class that will handle them.
In one special case where I rotate the device a "UIInternal" event is intercepted by this class within an @try block an exception is thrown.
We don't care about motion events. We only care about touch events.
I'm trying to check if the event is a of UIEventTypeMotion and simply return.
If I log the int value of the type of the event, it returns -1. If I throw it in a switch statement, It never matches UIEventTypeMotion, UIEventTypeTouches or UIEventTypeRemoteControl.
What's the proper way to check to see if the event.type is a motion type?
Thanks in advance.
Alex Zavatone
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden