-1

The closest documentation I could find was about WindowGroup. I came across this when I was looking at how to convert a View into a bitmap.

The documentation on what is being represented here UIApplication.shared.windows[0].rootViewController.view is pretty scarce which I believe is because they weren't expecting people to access it. Could someone give me a breakdown of what windows are? How is it different from views?

Paul
  • 1,101
  • 1
  • 11
  • 20
  • 2
    Imagine windows on a pc or a Mac. On iPads and Mac devices you can have multiple windows like you have two safari windows, two Xcode windows. https://developer.apple.com/documentation/swiftui/windowgroup . Windows contain Views such as buttons, menus, lists, images, etc. – lorem ipsum Sep 29 '21 at 21:42
  • https://developer.apple.com/library/archive/featuredarticles/ViewControllerPGforiPhoneOS/TheViewControllerHierarchy.html – lorem ipsum Sep 29 '21 at 21:45
  • Amazing, thank you – Paul Sep 29 '21 at 21:55
  • 1
    I'm glad it helped. I posted an answer please accept and upvote if you would like. – lorem ipsum Sep 29 '21 at 22:48

1 Answers1

1

Think about a PC or a Mac

A window consists of a frame area and body area that lets the user view and interact with content in an app. A window can appear onscreen alongside other windows, or it can fill the entire screen.

https://developer.apple.com/design/human-interface-guidelines/macos/windows-and-views/window-anatomy/

https://developer.apple.com/documentation/swiftui/windowgroup

Imagine 2 Safari windows or 2 Xcode windows.

A Window contains Views such as buttons, menus, lists, images, etc.

 UIApplication.shared.windows[0].rootViewController.view

Is UIKit based code not SwiftUI, you won't find any documentation on it with the SwiftUI Framework documentation but there are plenty of "old" references that break down what it is.

https://developer.apple.com/library/archive/featuredarticles/ViewControllerPGforiPhoneOS/TheViewControllerHierarchy.html

lorem ipsum
  • 21,175
  • 5
  • 24
  • 48