Post

Replies

Boosts

Views

Activity

Reply to How to create an overlay with padding that ignores the safe area?
Hi, if you put .ignoresSafeArea() after the .overlay. it'll work. struct ContentView: View { var body: some View { List { Text("Content") } .overlay(alignment: .bottom) { content } .ignoresSafeArea() } var content: some View { VStack { Text("Custom Container") } .frame(maxWidth: .infinity) .frame(height: 400) .background(Color.gray, in: .rect(corners: .concentric, isUniform: true)) .padding(15) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3w