Explain the purpose of using UIWindow object?

UIWindow object coordinates the one or more views presenting on the screen.

UIKit handles most window-related interactions, working with other objects as needed to implement many app behaviors. You use windows only when you need to do the following: Provide a main window to display your app’s content. Create additional windows (as needed) to display additional content.
You also use UIWindow objects for a handful of other tasks:

  • Setting the z-axis level of your window, which affects the visibility of the window relative to other windows.
  • Showing windows and making them the target of keyboard events.
  • Converting coordinate values to and from the window’s coordinate system.
  • Changing the root view controller of a window.
  • Changing the screen on which the window is displayed.

Windows do not have any visual appearance of their own. Instead, a window hosts one or more views, which are managed by the window’s root view controller. You configure the root view controller in your storyboards, adding whatever views are appropriate for your interface.