RBUICenter Class Reference

Inherits from NSObject
Conforms to RBObserverCollectionDelegate
Declared in RBUICenter.h

Overview

Provides state and convenience methods for the application’s UI.

+ shared

The shared UI center.

+ (nonnull RBUICenter *)shared

Discussion

The shared UI center.

Declared In

RBUICenter.h

  window

The application window.

@property (nonatomic, readonly, nullable) UIWindow *window

Discussion

The application window.

Declared In

RBUICenter.h

  rootViewController

The application root view controller.

@property (nonatomic, readonly, nullable) UIViewController *rootViewController

Discussion

The application root view controller.

Declared In

RBUICenter.h

  rootView

The application root view.

@property (nonatomic, readonly, nullable) UIView *rootView

Discussion

The application root view.

Declared In

RBUICenter.h

– topViewController

Gets the top-most presented view controller.

- (nullable UIViewController *)topViewController

Discussion

Gets the top-most presented view controller.

This is not for view controllers presented with RBPresentationController.

Declared In

RBUICenter.h

+ screenSize

The current rotation-adjusted screen size.

+ (CGSize)screenSize

Discussion

The current rotation-adjusted screen size.

Declared In

RBUICenter.h

– statusBarFrameInView:

Calculates the status bar frame that occupies the given view.

- (CGRect)statusBarFrameInView:(nonnull UIView *)view

Parameters

view

The view to use as the local coordinate system.

Return Value

The resulting CGRect frame.

Discussion

Calculates the status bar frame that occupies the given view.

Declared In

RBUICenter.h

  deviceOrientation

The current device orientation.

@property (nonatomic, readonly) UIDeviceOrientation deviceOrientation

Discussion

The current device orientation.

Declared In

RBUICenter.h

  deviceOrientationIsLandscape

Whether or not the current device orientation is landscape.

@property (nonatomic, readonly) BOOL deviceOrientationIsLandscape

Discussion

Whether or not the current device orientation is landscape.

Declared In

RBUICenter.h

  deviceOrientationIsPortrait

Whether or not the current device orientation is portrait.

@property (nonatomic, readonly) BOOL deviceOrientationIsPortrait

Discussion

Whether or not the current device orientation is portrait.

Declared In

RBUICenter.h

  deviceOrientationObservers

A collection of observers to be notified of changes to the device orientation.

@property (nonatomic, readonly, nonnull) RBObserverCollection *deviceOrientationObservers

Discussion

A collection of observers to be notified of changes to the device orientation.

Declared In

RBUICenter.h

  keyboardIsOpening

Whether or not the keyboard is currently opening.

@property (nonatomic, readonly) BOOL keyboardIsOpening

Discussion

Whether or not the keyboard is currently opening.

Declared In

RBUICenter.h

  keyboardIsHiding

Whether or not the keyboard is currently hiding.

@property (nonatomic, readonly) BOOL keyboardIsHiding

Discussion

Whether or not the keyboard is currently hiding.

Declared In

RBUICenter.h

  keyboardIsOpen

Whether or not the keyboard is currently open.

@property (nonatomic, readonly) BOOL keyboardIsOpen

Discussion

Whether or not the keyboard is currently open.

Declared In

RBUICenter.h

– keyboardFrameInView:

Calculates the frame of the keyboard that occupies the given view.

- (CGRect)keyboardFrameInView:(nonnull UIView *)view

Parameters

view

The view to use as the local coordinate system.

Return Value

The resulting CGRect value.

Discussion

Calculates the frame of the keyboard that occupies the given view.

Declared In

RBUICenter.h

  keyboardAnimationDuration

The animation duration used for keyboard open/hide transitions.

@property (nonatomic, readonly) NSTimeInterval keyboardAnimationDuration

Discussion

The animation duration used for keyboard open/hide transitions.

Declared In

RBUICenter.h

  keyboardAnimationCurve

The animation curve used for keyboard open/hide transitions.

@property (nonatomic, readonly) UIViewAnimationCurve keyboardAnimationCurve

Discussion

The animation curve used for keyboard open/hide transitions.

Declared In

RBUICenter.h

  keyboardObservers

A collection of observers to be notified of changes to the keyboard state.

@property (nonatomic, readonly, nonnull) RBObserverCollection *keyboardObservers

Discussion

A collection of observers to be notified of changes to the keyboard state.

Declared In

RBUICenter.h

– keyboardIntersectionWithView:

Returns the frame in the view where the keyboard intersects with the view.

- (CGRect)keyboardIntersectionWithView:(nonnull UIView *)view

Parameters

view

The view to use as the local coordinate system.

Return Value

The resulting CGRect value.

Discussion

Returns the frame in the view where the keyboard intersects with the view.

Declared In

RBUICenter.h

– keyboardInsetsWithView:

Returns the insets that would be required in the given view to avoid the keyboard.

- (UIEdgeInsets)keyboardInsetsWithView:(nonnull UIView *)view

Parameters

view

The view to use as the local coordinate system.

Return Value

The resulting CGRect value.

Discussion

Returns the insets that would be required in the given view to avoid the keyboard.

Declared In

RBUICenter.h