UnbluUiWindow
public class UnbluUiWindow : UIWindow
Custom UiWindow to better differ between unblu ui in the view hierachy. It is used for the UnbluUi
-
The normal window level for Unblu UI content. It’s default value is UIWindow.Level.normal + 10.
When making updates to this property yourself, it is very important to keep in mind the other Unblu UI Window property
UnbluUIWindow.maxCapturingLevel
.- When you update
UnbluUIWindow.windowLevel
,UnbluUIWindow.maxCapturingLevel
is updated automatically to remain at least +5 above, e.g:UnbluUIWindow.maxCapturingLevel = UnbluUIWindow.windowLevel + 5
For more information on the behaviour ofUnbluUIWindow.maxCapturingLevel
, see the property documentation.
Declaration
Swift
public static var windowLevel: UIWindow.Level { get set }
- When you update
-
The maximum windowLevel that Unblu will capture during mobile cobrowsing. If you have other UIWindows in your application, their level must be lower or equal than
UnbluUiWindow.maxCapturingLevel
to be captured. There are also some prerequisites for capturing defined in the discussion below.In order for a
UIWindow
to be captured by Unblu, it’s windowLevel property must be satisfied by the following criteria:- The
UIWindow
can have a windowLevel ofUIWindow.Level.statusBar
- The
UIWindow
can have a windowLevel ofUIWindow.Level.alert
- If 1 of the previous 2 points are not satisfied, the
UIWindow
must have a windowLevel of at leastUIWindow.Level.normal
, and at mostUnbluUIWindow.maxCapturingLevel
.
If you want to manage
UnbluUIWindow.maxCapturingLevel
yourself, please keep in mind the following important points:UnbluUIWindow.maxCapturingLevel
is automatically updated when you make changes toUnbluUIWindow.windowLevel
.- To avoid any potential capturing problems,
UnbluUIWindow.maxCapturingLevel
must always be greater thanUnbluUIWindow.windowLevel
. - Always update
UnbluUIWindow.windowLevel
beforeUnbluUIWindow.maxCapturingLevel
to ensure your changes are respected, e.g:UnbluUIWindow.windowLevel = UIWindow.Level.normal + 10 UnbluUIWindow.maxCapturingLevel = UIWindow.Level.normal + 11
Declaration
Swift
public static var maxCapturingLevel: UIWindow.Level { get set }
- The
-
The
UIWindow.Level
Unblu’s hiddenUIWindow
uses. By default, this takes a value ofUIWindow.Level.normal - 100
. Unblu uses a hiddenUIWindow
to make sure the connection with Unblu remains active in the background when the Unblu UI is closed.Be careful when making changes to this property. It is recommended that you keep the default, but if you do change it, make sure it’s value is less than the windowLevel you use for your app’s content.
Declaration
Swift
public static var hiddenWindowLevel: UIWindow.Level { get set }
-
Use this property if you have a
UIWindow
set to the same windowLevel as UnbluUiWindow, i.e.UnbluUIWindow.windowLevel
but you do not want thisUIWindow
to be captured during mobile cobrowsing.When a
UIWindow
is configured in this way, Unblu will replace your UIWindow with an overlay. This increases performance as the UI inside theUIWindow
will not be traversed during mobile cobrowsing.let uncapturedWindow = UIWindow() uncapturedWindow.windowLevel = UnbluUIWindow.windowLevel // Set the tag property to UnbluUIWindow.windowTag to make sure this UIWindow is not captured by Unblu uncapturedWindow.tag = UnbluUIWindow.windowTag
Declaration
Swift
public static let windowTag: Int