I managed to render a full width / height background with a modifier that looks like this.-
.background {
AsyncImage(
url: url,
transaction: Transaction(animation: .easeIn)
) { phase in
if let image = phase.image {
image
.resizable()
.scaledToFill()
} else if phase.error != nil {
EmptyView()
} else {
ProgressView()
}
}
.containerRelativeFrame([.horizontal, .vertical])
}
But it still gets clipped by the navigation title bar. I'm aware I could just hide the full navigationBar with .navigationBarHidden(true) and then render the title and back button myself but, is it possible to keep the native navigationBar and render my background behind it?
Finally
.ignoresSafeArea()modifier did the trick.