HomeiOS Developmentios - Keyboard glints and display screen jumps when utilizing SecureField and...

ios – Keyboard glints and display screen jumps when utilizing SecureField and TextField collectively in SwiftUI


This works

 VStack{
                TextField("Enter your electronic mail", textual content: $electronic mail)
                    .font(.subheadline)
                    .padding(12)
                    .background(Colour(.systemGray6))
                    .cornerRadius(10)
                    .padding(.horizontal, 24)
                
                TextField("Enter your password", textual content: $password)
                    .font(.subheadline)
                    .padding(12)
                    .background(Colour(.systemGray6))
                    .cornerRadius(10)
                    .padding(.horizontal, 24)
            }

TextFields solely

This glitches, inflicting the display screen and keyboard to flicker/bounce

 VStack{
                TextField("Enter your electronic mail", textual content: $electronic mail)
                    .font(.subheadline)
                    .padding(12)
                    .background(Colour(.systemGray6))
                    .cornerRadius(10)
                    .padding(.horizontal, 24)
                
                SecureField("Enter your password", textual content: $password)
                    .font(.subheadline)
                    .padding(12)
                    .background(Colour(.systemGray6))
                    .cornerRadius(10)
                    .padding(.horizontal, 24)
            }

TextField + SecureField

I’m utilizing iOS17. I’ve tried on each simulated and bodily (iPhone 13 Professional Max) units. It’s extra noticeable on the bodily gadget, nevertheless I nonetheless discover it on the simulator. Unsure whether it is one thing I’m doing fallacious, or if it is a bug.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments