• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iOS - Proper way to check UIEvent or UInternalEvent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: iOS - Proper way to check UIEvent or UInternalEvent
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Why do so many iOS apps have such poor quality?
  • Next by Date: Re: C Assert in BSD Static Library
  • Previous by thread: Why do so many iOS apps have such poor quality?
  • Next by thread: Re: iOS - Proper way to check UIEvent or UInternalEvent
  • Index(es):
    • Date
    • Thread