This PR provides the foundation for enabling head-gaze interactions in SwiftUI view hierarchies. The main entry point for this style of interaction is the GazeButton, which is designed to have a similar API to the built-in Button type.
This PR also includes DocC-compatible documentation comments on many of the new types and methods, which can be viewed in the the documentation window:
Notes for Reviewers
There are a lot of changes in here, many of which are documentation comments, so I wanted to just give a quick outline of the most important components that comprise this feature:
GazeButton - The main component for utilizing head-gaze interactions in SwiftUI
BridgedGazeableButton - The UIKit component that backs the GazeButon
Supporting types, such as:
ButtonRole
ButtonState
GazeButtonStyle & GazeButtonStyleConfiguration
GazeableAlert - A bridged version of the app's existing GazeableAlertViewController
NOTE: Since this is a foundational PR, no SwiftUI views are actually added to the app yet. However, as an example, I did create a SwiftUI version of the Edit Category Detail screen. I recommend checking out EditCategoryDetail.swift to get an idea of what's possible with these foundational pieces. If you'd like to see it in the app (iPad recommended), navigate to EditCategoriesViewController.swift and replace line 236 with the following lines:
This PR provides the foundation for enabling head-gaze interactions in SwiftUI view hierarchies. The main entry point for this style of interaction is the
GazeButton
, which is designed to have a similar API to the built-inButton
type.This PR also includes DocC-compatible documentation comments on many of the new types and methods, which can be viewed in the the documentation window:
Notes for Reviewers
There are a lot of changes in here, many of which are documentation comments, so I wanted to just give a quick outline of the most important components that comprise this feature:
GazeButton
- The main component for utilizing head-gaze interactions in SwiftUIBridgedGazeableButton
- The UIKit component that backs theGazeButon
ButtonRole
ButtonState
GazeButtonStyle
&GazeButtonStyleConfiguration
GazeableAlert
- A bridged version of the app's existingGazeableAlertViewController
NOTE: Since this is a foundational PR, no SwiftUI views are actually added to the app yet. However, as an example, I did create a SwiftUI version of the Edit Category Detail screen. I recommend checking out
EditCategoryDetail.swift
to get an idea of what's possible with these foundational pieces. If you'd like to see it in the app (iPad recommended), navigate toEditCategoriesViewController.swift
and replace line 236 with the following lines: