pub struct PointerInteractions {
pub application_supports_indirect_input_events: Option<bool>,
}Expand description
Pointer Interactions
Fields§
§application_supports_indirect_input_events: Option<bool>A Boolean value indicating that the app generally supports indirect input mechanisms.
If this key is not present or returns NO:
- When the user clicks an indirect pointing device, UIKit generates a UITouch of type UITouch.TouchType.direct.
- When pinching or rotating using an indirect touch surface, UIKit creates touches a fixed distance apart that simulate the gesture on the indirect touch surface.
- Because these are normal UITouch events, they may incidentally activate other gesture recognizers
If the key is present and returns YES:
- When the user clicks an indirect pointing device, UIKit generates a UITouch of type UITouch.TouchType.indirectPointer.
- When pinching or rotating using an indirect touch surface, UIKit drives UIPinchGestureRecognizer and UIRotationGestureRecognizer with an event of type UIEvent.EventType.transform.
- Currently, only certain prepackaged gestures in UIKit, like UIPinchGestureRecognizer and UIRotationGestureRecognizer, are capable of handling this event. Other gestures may be added to this list in future releases.
- Gestures that may have worked previously with the simulated touches no longer work.
- Be careful with certain UIGestureRecognizer APIs when gestures are driven by events of type UIEvent.EventType.scroll or UIEvent.EventType.transform.numberOfTouches returns 0, andlocation(ofTouch:in:) raises an exception because there are no touches driving these gestures with those events.
For the case when exceptions might be raised, use either shouldReceive(:) or the delegate call of gestureRecognizer(:shouldReceive:) to determine that gesture recognizers are acting on a non-touch-based event.
§Important
UIApplicationSupportsIndirectInputEvents is a compatibility affordance to ease the adoption of indirect input for a UIKit application. In a future release, this new behavior will become the default and this key will no longer be consulted.
§Availability
- iOS 13.4+
§Framework
- UIKit
Trait Implementations§
Source§impl Clone for PointerInteractions
impl Clone for PointerInteractions
Source§fn clone(&self) -> PointerInteractions
fn clone(&self) -> PointerInteractions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PointerInteractions
impl Debug for PointerInteractions
Source§impl Default for PointerInteractions
impl Default for PointerInteractions
Source§fn default() -> PointerInteractions
fn default() -> PointerInteractions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PointerInteractions
impl<'de> Deserialize<'de> for PointerInteractions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PointerInteractions
impl PartialEq for PointerInteractions
Source§impl Serialize for PointerInteractions
impl Serialize for PointerInteractions
impl Eq for PointerInteractions
impl StructuralPartialEq for PointerInteractions
Auto Trait Implementations§
impl Freeze for PointerInteractions
impl RefUnwindSafe for PointerInteractions
impl Send for PointerInteractions
impl Sync for PointerInteractions
impl Unpin for PointerInteractions
impl UnwindSafe for PointerInteractions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.