Sunday, April 14, 2024
HomeiOS Developmentios - SwiftUI - Grid/Desk Structure for person enter (Rows) -

ios – SwiftUI – Grid/Desk Structure for person enter (Rows) –


Making an attempt to make a SWiftUI structure, finish purpose shall be to have it look kind of like a desk view. Proper now I’m utilizing a grid. Throughout the Grid are Rows of (normally) a Label(), and three TextFields(). That is my present code for it, proper now it seems to be okay, nevertheless when i kind within the textfields after a specific amount of character have been inputed it begins to increase the reduce the label and different textfield out of website. Any advise?

Grid {
   // Fundamental Empty Weight Row
   GridRow {
      Label("Fundamental Empty", systemImage: "")
         .labelStyle(.titleOnly)
                            
      TextField("W", textual content: $basicEmpW)
      TextField("A", textual content: $basicEmpA)
      TextField("MOM", textual content: $basicEmpMOM)
   }
   .padding(.horizontal, 10)
   .fixedSize(horizontal: true, vertical: false)
                    
   // Pilot Row
   GridRow {
     Label("Pilot / Co-Pilot", systemImage: "star.fill")
        .padding(.horizontal, 10)
        .lineLimit(0)
                            
     TextField("W", textual content: $pcpW)
     TextField("A", textual content: $pcpA)
     TextField("MOM", textual content: $pcpMOM)
   }
   .padding(.horizontal, 10)
   .fixedSize(horizontal: true, vertical: false)
   .multilineTextAlignment(.heart)
   
   // Zero Gas Weight Row
   GridRow {
     Label("Zero Gas", systemImage: "health club.bag.fill")
        Label(zerofW, systemImage: "health club.bag.fill")
   }

https://imgur.com/a/2RuLxdV <— gif of what taking place when i kind within the TextField



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments