Build: Adaptive Layout Screen
This screen uses GeometryReader to adapt the layout of two colored boxes based on the available screen size. The boxes adjust their width and height dynamically to fit nicely on any device orientation or size.
Target UI
┌───────────────────────────────┐ │ Adaptive Layout Screen │ ├───────────────────────────────┤ │ ┌───────────────┐ ┌───────────┐│ │ │ Red Box │ │ Blue Box ││ │ │ (width adapts)│ │(width adapts)││ │ └───────────────┘ └───────────┘│ │ │ └───────────────────────────────┘
Use GeometryReader to get the screen width and height
Place two colored rectangles side by side horizontally
Each rectangle's width should be half of the available width minus some spacing
Height of rectangles should be 150 points
Add some spacing between the rectangles
Use SwiftUI and ensure the layout adapts to screen size changes