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.maxCapturingLevelis updated automatically to remain at least +5 above, e.g:UnbluUIWindow.maxCapturingLevel = UnbluUIWindow.windowLevel + 5For 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.maxCapturingLevelto be captured. There are also some prerequisites for capturing defined in the discussion below.In order for a
UIWindowto be captured by Unblu, it’s windowLevel property must be satisfied by the following criteria:- The
UIWindowcan have a windowLevel ofUIWindow.Level.statusBar - The
UIWindowcan have a windowLevel ofUIWindow.Level.alert - If 1 of the previous 2 points are not satisfied, the
UIWindowmust have a windowLevel of at leastUIWindow.Level.normal, and at mostUnbluUIWindow.maxCapturingLevel.
If you want to manage
UnbluUIWindow.maxCapturingLevelyourself, please keep in mind the following important points:UnbluUIWindow.maxCapturingLevelis automatically updated when you make changes toUnbluUIWindow.windowLevel.- To avoid any potential capturing problems,
UnbluUIWindow.maxCapturingLevelmust always be greater thanUnbluUIWindow.windowLevel. - Always update
UnbluUIWindow.windowLevelbeforeUnbluUIWindow.maxCapturingLevelto 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.LevelUnblu’s hiddenUIWindowuses. By default, this takes a value ofUIWindow.Level.normal - 100. Unblu uses a hiddenUIWindowto 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
UIWindowset to the same windowLevel as UnbluUiWindow, i.e.UnbluUIWindow.windowLevelbut you do not want thisUIWindowto be captured during mobile cobrowsing.When a
UIWindowis configured in this way, Unblu will replace your UIWindow with an overlay. This increases performance as the UI inside theUIWindowwill 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.windowTagDeclaration
Swift
public static let windowTag: Int
UnbluUiWindow Class Reference