Overlay window

Provides a window which can have an arbitrary number of overlay views that will sit above the root view of the window. Overlays will be the full size of the screen, and will be rotated as appropriate based on device orientation. For performance, owners of overlay views should set the |hidden| property to YES when the overlay is not in use.

Overlay Window is used by components such as Snackbar. Snackbar uses Overlay Window to ensure displayed message views are always visible to the user by being at the top of the view hierarchy.

Installation

Installation with CocoaPods

To add this component to your Xcode project using CocoaPods, add the following to your Podfile:

Then, run the following command:


Usage

Importing

Before using the Overlay Window, you'll need to import it:

Swift

Objective-C

Examples

Setting the Overlay Window

Using the Overlay Window requires that the App Delegate set the window as an Overlay Window or a subclass of Overlay Window.

Swift

Objective-C

Using the Overlay Window

Once the Overlay Window is set in the App Delegate, the client can use the Overlay Window to display views at the top most level of the view hierarchy.

Swift

Objective-C