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
options
The options that specify which events to monitor. By default, all events are monitored.
queue
The operation queue on which the handler executes. By default, the main operation queue is used.
handler
The handler to call when the current focus is updated or cannot be moved in the selected direction.
-
Declaration
Swift
override public func addNotificationObservers()