FocusMonitor
@available(iOS 11.0, tvOS 11.0, *)
public class FocusMonitor : BaseNotificationMonitor
A FocusMonitor instance monitors the app for changes to the current focus
in the view hierarchy.
-
Encapsulates changes to the focus in the app’s view hierarchy.
See moreDeclaration
Swift
public enum Event -
Encapsulates information associated with a focus monitor event.
See moreDeclaration
Swift
public struct Info -
Specifies which events to monitor.
See moreDeclaration
Swift
public struct Options : OptionSet -
Initializes a new
FocusMonitor.Declaration
Parameters
optionsThe options that specify which events to monitor. By default, all events are monitored.
queueThe operation queue on which the handler executes. By default, the main operation queue is used.
handlerThe handler to call when the current focus is updated or cannot be moved in the selected direction.
-
Declaration
Swift
override public func addNotificationObservers()
View on GitHub
Install in Dash
FocusMonitor Class Reference