RobotUIKit API
|
Base class for view controllers that wish to be shown modally on top of their parent views. More...
#import <RUIModalLayerViewController.h>
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 |
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.
+ (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.
animated | Whether 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.
parentViewController | The modal layer's content 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.
target | The target to send the completion action to. |
action | The action to perform on the target when this modal view controller has been dismissed. |
- (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.