1

I tried this aproach https://stackoverflow.com/a/66925913/15450928 but is seems I can't center my graphical date and time picker.

Maybe someone has an idea about it.

This is what I use:

        .sheet(isPresented: $showEditDataTime, content: {
            EditDateAndTimeView()
                .frame(height: 580)
                .clearModalBackground()
        })

Here is my current result: enter image description here I need to create a Sheet with dynamic height for choosing a date and time and also have 2 buttons under this picker with a custom navigation bar.

The result should be something like this: enter image description here

Lce
  • 23
  • 6
  • 1
    It seems that on iOS 14.7 you reinvent what is supposed to work on iOS 16 out of the box, so I will just use: if #available(iOS 16.0, *) { EditDateAndTimeView() .presentationDetents([.height(dataAndTimeSheetHeight)]) } else { EditDateAndTimeView() } – Lce Aug 30 '23 at 09:54

0 Answers0