Modal View Touch Input Override via Runtime Swizzling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Mobile devices face challenges in processing touch inputs efficiently due to the default behavior of hit-test views, where touch inputs are often allocated to the lowest view in the hierarchy, limiting the ability to override and process inputs by higher views, such as modal views.

Innovation Solution

Implementing a nested hierarchy of views where a modal view can override the default hit-test behavior by using run-time swizzling to process touch inputs, allowing higher views to capture and process inputs within the modal view, even if they overlap with lower views.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the default hit-test behavior allocates touch input to the lowest view in the hierarchy, then the processing is simple and efficient, but higher views cannot override and process inputs that should be handled by them

Engineering Contradiction:
Improveability of higher views to override touch input processingVSAvoidcomplexity of touch input processing mechanism
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a nested hierarchy of views where each view can contain other views, similar to nested dolls. The hit-test mechanism traverses this nested structure from top to bottom, allowing higher views to intercept and process touch inputs before they reach lower views. This nesting structure enables flexible override capability while maintaining a systematic organization of views.

Inventive Principle:
Principle #7Nested doll (Nesting)

Solution Approach 2:

The patent applies preliminary action by allowing higher views to preemptively claim touch inputs before the default hit-test would allocate them to lower views. The system performs a preliminary check to determine if any higher view wants to process the touch input, and if so, that view handles it immediately, preventing the need for complex post-processing or re-allocation mechanisms.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If a modal view is introduced to override hit-test behavior, then flexible input handling is achieved, but the processing time and computational overhead increase

Engineering Contradiction:
Improveflexibility of touch input handlingVSAvoidtouch input processing time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent implements partial action by allowing only views that explicitly declare interest in processing touch inputs (through the wantsTouchEvents property) to intercept inputs. This selective approach avoids the overhead of checking every view in the hierarchy, as the system only engages with views that have preliminarily indicated their desire to handle touch events, thus reducing processing time while maintaining flexibility.

Inventive Principle:
Principle #16Partial or excessive action

3Adaptability or versatility

If run-time swizzling is used to implement modality, then dynamic override capability is achieved, but the system reliability and predictability decrease

Engineering Contradiction:
Improvedynamic modal view implementationVSAvoidpredictability of touch input processing
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent applies dynamics by allowing views to dynamically change their modal state through the wantsTouchEvents property, which can be set at runtime. This enables flexible adaptation to different user interface states without requiring rigid pre-programming of all possible scenarios. The system remains predictable because the dynamic changes are controlled through explicit property setting rather than opaque runtime code modification.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS9703477B2Handling overloaded gestures
Publication Date: 2017.07.11 META PLATFORMS INC
  • US9703477B2 patent drawing
  • US9703477B2 patent drawing
  • US9703477B2 patent drawing

AI summary

In one embodiment, a method includes receiving a touch input within a particular region of a display area of the computing device. The display area presents a user interface (UI) including a number of views and an outside view. Each of the views corresponds to one or more regions of the display area. One or more of the views has a gesture recognizer configured to process a touch input detected within the regions of the display area associated with each of the views. The outside view has a gesture recognizer configured to process the touch input detected within the display area. The views are organized in a hierarchy. The method also includes determining whether a particular one of the views from among the views is set as a modal view.