Vertical orientation and panorama orientation are totally different within the Xcode simulator

0
11
Vertical orientation and panorama orientation are totally different within the Xcode simulator


Once I run my code and begin the simulator, vertical orientation seems good, however once I flip to panorama orientation, the title within the show cuts.

import SwiftUI
struct ContentView: View {
    @Atmosphere(.horizontalSizeClass) var hSizeClass
    @Atmosphere(.verticalSizeClass) var vSizeClass
    var physique: some View {
        if hSizeClass == .compact && vSizeClass == .common {
            compactDesign()
        }else {
            regularDesign()
        }
    } }
struct compactDesign: View {
    var physique: some View{
        ZStack {
            Coloration.inexperienced.edgesIgnoringSafeArea(.all)
            VStack(){
                Picture("Icono")
                    .resizable()
                    .body(width: 80, top: 80, alignment: .heart)
                    .clipShape(Circle())
                Textual content("María Ramirez")
                    .font(.largeTitle)
                    .foregroundColor(.white)
                    .daring()
                Textual content("Calle #123")
                    .foregroundColor(.white).font(.title).italic()
            }
        }
    } }
struct regularDesign: View {
    var physique: some View{
        ZStack {
            Coloration.blue.edgesIgnoringSafeArea(.all)
            HStack(){
                Picture("Icono")
                    .resizable()
                    .body(width: 80, top: 80, alignment: .heart)
                VStack(alignment: .main, spacing: 10){
                    Textual content("María Ramirez")
                        .font(.largeTitle)
                        .foregroundColor(.white)
                        .daring()
                        .clipShape(Circle())
                    Textual content("Calle #123")
                        .foregroundColor(.white).font(.title).italic()
                }
            }
        }
    } }
struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    } }

LEAVE A REPLY

Please enter your comment!
Please enter your name here