Index

RBUICenter.swift

Protocols

Classes


RBUICenter

Properties

The shared UI center.
static public var shared RBUICenter { get set }

The application window.
public var window UIWindow? { get }

The application root view controller.
public var rootViewController UIViewController? { get }

The application root view.
public var rootView UIView? { get }

The current device orientation.
public var deviceOrientation UIDeviceOrientation { get }

Whether or not the current device orientation is landscape.
public var deviceOrientationIsLandscape Bool { get }

Whether or not the current device orientation is portrait.
public var deviceOrientationIsPortrait Bool { get }

A collection of observers to be notified of changes to the device orientation.
public var deviceOrientationObservers RBObserverCollection { get }

Whether or not the keyboard is currently opening.
public var keyboardIsOpening Bool { get }

Whether or not the keyboard is currently hiding.
public var keyboardIsHiding Bool { get }

Whether or not the keyboard is currently open.
public var keyboardIsOpen Bool { get }

The animation duration used for keyboard open/hide transitions.
public var keyboardAnimationDuration TimeInterval { get }

The animation curve used for keyboard open/hide transitions.
public var keyboardAnimationCurve UIViewAnimationCurve { get }

A collection of observers to be notified of changes to the keyboard state.
public var keyboardObservers RBObserverCollection { get }

Functions

The current rotation-adjusted screen size.
public class func screenSize() -> CGSize

Gets the top-most presented view controller. This is not for view controllers presented with RBPresentationController.
public func topViewController() -> UIViewController?

Returns the frame in the view where the keyboard intersects with the view.
@param view : The view to use as the local coordinate system.
@returns The resulting CGRect value.
public func keyboardIntersection(with view: UIView) -> CGRect

Returns the insets that would be required in the given view to avoid the keyboard.
@param view : The view to use as the local coordinate system.
@returns The resulting UIEdgeInsets value.
public func keyboardInsets(with view: UIView) -> UIEdgeInsets

Calculates the status bar frame that occupies the given view.
@param view : The view to use as the local coordinate system.
@returns The resulting CGRect frame.
public func statusBarFrame(in view: UIView) -> CGRect

Calculates the frame of the keyboard that occupies the given view.
@param view : The view to use as the local coordinate system.
@returns The resulting CGRect value.
public func keyboardFrame(in view: UIView) -> CGRect