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

Declared In

RBUICenter.h

  window

The application window.

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

Declared In

RBUICenter.h

  rootViewController

The application root view controller.

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

Declared In

RBUICenter.h

  rootView

The application root view.

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

Declared In

RBUICenter.h

– topViewController

Gets the top-most presented view controller.

- (nullable UIViewController *)topViewController

Discussion

This is not for view controllers presented with RBPresentationController.

Declared In

RBUICenter.h

+ screenSize

The current rotation-adjusted screen size.

+ (CGSize)screenSize

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.

Declared In

RBUICenter.h

  deviceOrientation

The current device orientation.

@property (nonatomic, readonly) UIDeviceOrientation deviceOrientation

Declared In

RBUICenter.h

  deviceOrientationIsLandscape

Whether or not the current device orientation is landscape.

@property (nonatomic, readonly) BOOL deviceOrientationIsLandscape

Declared In

RBUICenter.h

  deviceOrientationIsPortrait

Whether or not the current device orientation is portrait.

@property (nonatomic, readonly) BOOL deviceOrientationIsPortrait

Declared In

RBUICenter.h

  deviceOrientationObservers

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

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

Declared In

RBUICenter.h

  keyboardIsOpening

Whether or not the keyboard is currently opening.

@property (nonatomic, readonly) BOOL keyboardIsOpening

Declared In

RBUICenter.h

  keyboardIsHiding

Whether or not the keyboard is currently hiding.

@property (nonatomic, readonly) BOOL keyboardIsHiding

Declared In

RBUICenter.h

  keyboardIsOpen

Whether or not the keyboard is currently open.

@property (nonatomic, readonly) BOOL keyboardIsOpen

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.

Declared In

RBUICenter.h

  keyboardAnimationDuration

The animation duration used for keyboard open/hide transitions.

@property (nonatomic, readonly) NSTimeInterval keyboardAnimationDuration

Declared In

RBUICenter.h

  keyboardAnimationCurve

The animation curve used for keyboard open/hide transitions.

@property (nonatomic, readonly) UIViewAnimationCurve keyboardAnimationCurve

Declared In

RBUICenter.h

  keyboardObservers

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

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

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.

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.

Declared In

RBUICenter.h