BPKContainerController
@interface BPKContainerController : UIViewController
A view controller that manages wrapping a view hierarchy in a view.
The view controller hierarchy and thus view hierarchy contained in the controller is conditionally
rendered inside a container. By leveraging the container relationship consumers can use
UIAppearance
to alter the look of all views rendered within the container.
-
Create an instance with a given container view and root view controller.
Declaration
Objective-C
- (nonnull instancetype)initWithContainerClass:(nonnull Class)containerClass rootViewController: (nonnull UIViewController *)rootViewController;
Swift
init(containerClass: AnyClass, rootViewController: UIViewController)
Parameters
containerClass
The class of the container to wrap the view hierarchy in.
rootViewController
The root view controller to be used as a child view controller.
Return Value
A configured instance that can further be contained or set to be the
rootViewController
of awindow
. -
Controls whether the specified container is currently being used. The default value is
YES
. Changing the value of this property will immediately cause the view hierarchy to update to reflect the new state. As such it should only be called on the main thread.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isContainerActive) BOOL containerIsActive;
Swift
var isContainerActive: Bool { get set }
-
The container that is currently being used.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIView *_Nonnull container;
Swift
var container: UIView { get }