Post

Replies

Boosts

Views

Activity

Reply to about presentationDetents modifier
@State private var showSheet = false var body: some View { Button("show Sheet") { showSheet.toggle() } Spacer() .sheet(isPresented: $showSheet) { VStack { Text("this is Sheet") .font(.title) Button("close") { showSheet = false } } .presentationBackground(Color.white.opacity(0.8)) .presentationDetents([.medium]) } } } (sheet is full screen width on ios 18.6) (sheet is not full screen width)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
5d
Reply to about presentationDetents modifier
@State private var showSheet = false var body: some View { Button("show Sheet") { showSheet.toggle() } Spacer() .sheet(isPresented: $showSheet) { VStack { Text("this is Sheet") .font(.title) Button("close") { showSheet = false } } .presentationBackground(Color.white.opacity(0.8)) .presentationDetents([.medium]) } } } (sheet is full screen width on ios 18.6) (sheet is not full screen width)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
5d