-1

My SwiftUI interface doesn't fill up the entire screen.

This is what it's supposed to look like:

What it's supposed to look like

This is what it actually looks like on the device:

What it actually looks like

This is my content view:

ContentView.swift

struct ContentView : View {
    var body: some View {
        ZStack(content: {
            Circle().fill(ColorManager.petSupportBlue).frame(width: 350, height: 350).position(x: -50, y:30).ignoresSafeArea()
            Circle().fill(ColorManager.petSupportBlue).frame(width: 350, height: 350).position(x: 50, y: -50).ignoresSafeArea()
        })
    }
}
Dayem Saeed
  • 305
  • 3
  • 12

1 Answers1

0

Use as follows

var body: some View {
    ZStack(content: {
        Circle().fill(ColorManager.petSupportBlue).frame(width: 350, height: 350).position(x: -50, y:30).ignoresSafeArea()
        Circle().fill(ColorManager.petSupportBlue).frame(width: 350, height: 350).position(x: 50, y: -50).ignoresSafeArea()
    })
    .frame(maxWidth: .infinity, maxHeight: .infinity)
    .ignoresSafeArea()
}
Asperi
  • 173,274
  • 14
  • 284
  • 455