OnSet detection for iOS