Conforms to *
:
T
UIView
Declared in RMActionController.h

Overview

A RMActionController displays some arbitrary view in a UIActionSheet/UIAlertController like manner to the user. It is used by RMDateSelectionViewController and RMPickerViewController.

Usually, RMActionController is subclassed to display custom content views. See RMDateSelectionViewController and RMPickerViewController on how this works.

Tasks

Properties

actions

@property (nonnull, nonatomic, readonly) NSArray<RMAction<T> *> *actions
Discussion

An array of actions that has been added to the RMActionController

Declared In

RMActionController.h

contentView

@property (nonnull, nonatomic) T contentView
Discussion

The content view of the RMActionController.

Overwrite this method in a subclass of RMActionController and return your custom content view.

Declared In

RMActionController.h

disableBackgroundTaps

@property (nonatomic, assign) BOOL disableBackgroundTaps
Discussion

When YES taps on the background view are ignored. Default value is NO.

Declared In

RMActionController.h

disableBlurEffects

@property (assign, nonatomic) BOOL disableBlurEffects
Discussion

Used to enable or disable blurring the RMActionController. Default value is NO.

Warning: This property always returns YES if either UIBlurEffect, UIVibrancyEffect or UIVisualEffectView is not available on your system at runtime or transparency is reduced via accessibility options.

Declared In

RMActionController.h

disableBlurEffectsForActions

@property (assign, nonatomic) BOOL disableBlurEffectsForActions
Discussion

Used to enable or disable blurring actions. If you want the title of your action to appear in your tint color, set this to YES. Same for image actions: If the image should appear in its original colors, set this to YES. Otherwise NO.

The default value is NO.

Warning: This property always returns YES, if disableBlurEffects returns YES.

Declared In

RMActionController.h

disableBlurEffectsForBackgroundView

@property (assign, nonatomic) BOOL disableBlurEffectsForBackgroundView
Discussion

Used to enable or disable blurring the background of RMActionController.

Warning: This property always returns YES, if disableBlurEffects returns YES.

Declared In

RMActionController.h

disableBlurEffectsForContentView

@property (assign, nonatomic) BOOL disableBlurEffectsForContentView
Discussion

Used to enable or disable blurring the RMActionController content view.

Overwrite this method in subclasses of RMActionController if your custom content view cannot be shown within an UIVisualEffectView.

Warning: This property always returns YES, if disableBlurEffects returns YES.

Declared In

RMActionController.h

disableBouncingEffects

@property (assign, nonatomic) BOOL disableBouncingEffects
Discussion

Used to enable or disable bouncing effects when sliding in the RMActionController. Default value is NO.

Warning: This property always returns YES, if motion is reduced via accessibilty options.

Declared In

RMActionController.h

disableMotionEffects

@property (assign, nonatomic) BOOL disableMotionEffects
Discussion

Used to enable or disable motion effects. Default value is NO.

Warning: This property always returns YES, if motion is reduced via accessibilty options.

Declared In

RMActionController.h

message

@property (nullable, nonatomic, copy) NSString *message
Discussion

A message explaining why the RMActionController is shown.

Declared In

RMActionController.h

style

@property (nonatomic, assign, readonly) RMActionControllerStyle style
Discussion

The display style of the RMActionController.

Declared In

RMActionController.h

title

@property (nullable, nonatomic, copy) NSString *title
Discussion

A title for the RMActionController.

Declared In

RMActionController.h

Class Methods

actionControllerWithStyle:

+ (nullable instancetype)actionControllerWithStyle:(RMActionControllerStyle)style
Discussion

Returns a new instance of RMActionController.

Parameters

style

The action controller style for the new instance.

Return Value

A new instance of RMActionController.

Declared In

RMActionController.h

actionControllerWithStyle:selectAction:andCancelAction:

+ (nullable instancetype)actionControllerWithStyle:(RMActionControllerStyle)aStyle selectAction:(nullable RMAction<T> *)selectAction andCancelAction:(nullable RMAction<T> *)cancelAction
Discussion

Returns a new instance of RMActionController.

Parameters

aStyle

The action controller style for the new instance.

selectAction

An instance of RMAction whos handler is called when the select button is tapped.

cancelAction

An instance of RMAction whos handler is called when the cancel button is tapped.

Return Value

A new instance of RMActionController.

Declared In

RMActionController.h

actionControllerWithStyle:title:message:selectAction:andCancelAction:

+ (nullable instancetype)actionControllerWithStyle:(RMActionControllerStyle)aStyle title:(nullable NSString *)aTitle message:(nullable NSString *)aMessage selectAction:(nullable RMAction<T> *)selectAction andCancelAction:(nullable RMAction<T> *)cancelAction
Discussion

Returns a new instance of RMActionController.

Parameters

aStyle

The action controller style for the new instance.

aTitle

A title for the RMActionController

aMessage

A message explaining why the RMActionController is shown.

selectAction

An instance of RMAction whos handler is called when the select button is tapped.

cancelAction

An instance of RMAction whos handler is called when the cancel button is tapped.

Return Value

A new instance of RMActionController.

Declared In

RMActionController.h

Instance Methods

addAction:

- (void)addAction:(nonnull RMAction<T> *)action
Discussion

Use this method to add further actions to the RMActionController.

Parameters

action

The instance of RMAction to add.

Declared In

RMActionController.h

initWithStyle:title:message:selectAction:andCancelAction:

- (nullable instancetype)initWithStyle:(RMActionControllerStyle)aStyle title:(nullable NSString *)aTitle message:(nullable NSString *)aMessage selectAction:(nullable RMAction<T> *)selectAction andCancelAction:(nullable RMAction<T> *)cancelAction
Discussion

Initializes a new instance of RMActionController.

Overwrite this method when subclassing RMActionController. Initialize the custom content view and set the content view of the RMActionController to your content view in this method.

Parameters

aStyle

The action controller style for the new instance.

aTitle

A title for the RMActionController

aMessage

A message explaining why the RMActionController is shown.

selectAction

An instance of RMAction whos handler is called when the select button is tapped.

cancelAction

An instance of RMAction whos handler is called when the cancel button is tapped.

Return Value

An initialized of RMActionController.

Declared In

RMActionController.h