Ios swift – Lock orientation of a view to only landscape
I am trying to present a view in landscape orientation from a portrait view using the below code Button { isLandscapeViewPresented.toggle() } label: { Text("Click for landscape view") }.fullScreenCover(isPresented: $isLandscapeViewPresented) { LandscapeOnlyView { LandscapeView() } } And in LandscapeOnlyView wrapper…