RobotUIKit API
Public Member Functions | Static Public Member Functions | Properties
RUIModalLayerViewController Class Reference

Base class for view controllers that wish to be shown modally on top of their parent views. More...

#import <RUIModalLayerViewController.h>

Inheritance diagram for RUIModalLayerViewController:
RUIAchievementEarnedViewController RUICalibrationViewController RUIColorPickerViewController RUIRGBColorPickerViewController RUISlideToSleepViewController

List of all members.

Public Member Functions

(void) - dismissModalLayerViewControllerAnimated:
(UIView *) - layerViewForParentViewController:
(void) - setDismissedTarget:action:
(void) - layoutPortrait
(void) - layoutLandscape

Static Public Member Functions

(RUIModalLayerViewController *) + currentModalLayerViewController

Properties

CGFloat backgroundAlpha
UIColor * backgroundColor

Detailed Description

View controllers derived from this class will completely cover their parent views with an optionally semi-transparent 'glass' covering so that the parent view is blocked. The user can then only interact with the modal view until it is dismissed.

If you want the modalLayerViewController to automatically rotate to the proper orientation you must pass all willAnimateRotationToInterfaceOrientation:duration: to th modal layer view controller.


Member Function Documentation

+ (RUIModalLayerViewController *) currentModalLayerViewController

Get the currently active modal layer view controller.

- (void) dismissModalLayerViewControllerAnimated: (BOOL)  animated

Dismiss this modal layer view controller so that the parent view is available for interaction.

Parameters:
animatedWhether or not the dismissal of this view should be animated.
- (UIView *) layerViewForParentViewController: (UIViewController *)  parentViewController

Called by the framework to add a semi-transperant background and center the content view to the parent's bounds. This method can be overridden by subclasses to provide a different background for the modal view.

Parameters:
parentViewControllerThe modal layer's content view.
Returns:
The final modal view that will be embedded into the parent view.
- (void) layoutLandscape

Should be implemented in subclass to layout view in portrait.

Implemented in RUICalibrationViewController, and RUIColorPickerViewController.

- (void) layoutPortrait

Should be implemented in subclass to layout view in landscape.

Implemented in RUICalibrationViewController, and RUIColorPickerViewController.

- (void) setDismissedTarget: (id)  target
action: (SEL)  action 

Set a target object and action to be called when the modal view controller has been dismissed. The action is called with this view controller as its only argument.

Parameters:
targetThe target to send the completion action to.
actionThe action to perform on the target when this modal view controller has been dismissed.

Property Documentation

- (CGFloat) backgroundAlpha [read, write, assign]

The alpha channel value for the 'glass' covering the parent view.

- (UIColor *) backgroundColor [read, write, copy]

The color of the 'glass' covering the parent view.


The documentation for this class was generated from the following file:
 All Classes Functions Properties