Skip to content

No clear way out of README screen in iPhone landscape mode #259

Open
@vdhamer

Description

@vdhamer

Problem scenario:

  • start app in portrait mode (landscape mode is not really an option here on iPhone)
  • rotate phone for landscape mode
  • enter README screen in landscape mode
    —> bug: can only close screen by switching to portrait mode (or closing app)

The problem also shows up in the Preferences screen.

No problem if:

  • above scenario, running on iPad (not tested on iPhone Plus/Max)
  • or switching to landscape within README screen - you should have the idea to go back to portrait
  • or switching to landscape before opening the app on iPhone (iPhone Home Screen doesn’t support landscape)

Solution

Adjust sheet settings for iPhone? Is this an app bug or a SwiftUI bug?

      .sheet(isPresented: $showingPreferences, content: {
               PreferencesView(preferences: $model.preferences)
               // the detents don't do anything on an iPad
               .presentationDetents(detentsList, selection: $selectedPreferencesDetent)
               .presentationBackground(.regularMaterial) // doesn't work yet with PreferencesView
               .presentationCornerRadius(40)
               .presentationDragIndicator(.visible) // show drag indicator
         })

See comment by Paul Hudson: https://www.hackingwithswift.com/quick-start/swiftui/how-to-display-a-bottom-sheet

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions