BUHelper Class Reference

Inherits from NSObject
Declared in BUHelper.h

Overview

Helper methods when performing BlinkUp

+ fixRotationForViewController:

During BlinkUp, the rotation of the application and the status bar may become out of sync with the device orientation. In order to fix the orientation and status bar, this method can be called in an attempt to correct both. It works by quickly presenting an empty view controller with a clear background on the view controller passed in. It is then immediately dismissed which causes the presenting view controller to be redrawn in the correct orientation. It is important that this may cause the presenting view controller’s viewDidAppear and other methods to be called. This method works best if called after shouldAutorotate has been set to true (if it was altered for BlinkUp).

+ (void)fixRotationForViewController:(UIViewController *_Nonnull)presentingViewController

Parameters

presentingViewController

The view that is out of rotation or has the status bar in the incorrect orientation

Declared In

BUHelper.h

+ shouldAutorotate

This method can be used in the view controller, navigation controller, root view controller or other container view controllers to determine if BlinkUp should allow or prevent autorotation. It is recommended that you override the shouldAutorotate function of all view controllers that are in charge of rotation when a BlinkUp occurs.

+ (BOOL)shouldAutorotate

Return Value

true if the interface should rotate, false if a flash is occurring

Declared In

BUHelper.h

+ hardwareModel

Hardware model of the iOS Device

+ (nonnull NSString *)hardwareModel

Return Value

A String representation of the hardware device

Declared In

BUHelper.h

+ hardwareOS

Hardware OS of the iOS Device

+ (nonnull NSString *)hardwareOS

Return Value

String representing the OS version

Declared In

BUHelper.h

+ userIdentifier

Unique identifier for this user / device

Defaults to device’s identifierForVendor

+ (nonnull NSString *)userIdentifier

Return Value

String with a unique identifier

Declared In

BUHelper.h

+ setUserIdentifier:

Override the user identifier (can be set to the user’s email)

+ (void)setUserIdentifier:(NSString *_Nonnull)identifier

Parameters

identifier

Identifier for the user

Declared In

BUHelper.h