'How can make my Window size be big as Screen of mac?
I am using this code for help Xcode to build my Window Size as big as the screen of mac, but it does not get maxed! How we can read the size of screen and set it for view size for taking all available space on screen? It would be great getting a SwiftUI approach for the issue.
struct ContentView: View {
var body: some View {
Color.purple
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|