StatusBarMonitor

public class StatusBarMonitor : BaseNotificationMonitor

A StatusBarMonitor instance monitors the app for changes to the orientation of its user interface or to the frame of the status bar.

  • Encapsulates changes to the orientation of the app’s user interface and to the frame of the status bar.

    See more

    Declaration

    Swift

    public enum Event
  • Specifies which events to monitor.

    See more

    Declaration

    Swift

    public struct Options : OptionSet
  • Initializes a new StatusBarMonitor.

    Declaration

    Swift

    public init(options: Options = .all,
                queue: OperationQueue = .main,
                handler: @escaping (Event) -> Void)

    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 orientation of the app’s user interface or the frame of the status bar changes or is about to change.

  • The current frame rectangle defining the area of the status bar.

    Declaration

    Swift

    public var frame: CGRect { get }
  • The orientation of the app’s user interface.

    Declaration

    Swift

    public var orientation: UIInterfaceOrientation { get }
  • Declaration

    Swift

    override public func addNotificationObservers()