HomeiOS Developmentios - How you can maintain View keep on with the underside...

ios – How you can maintain View keep on with the underside when keyboard seems? ignoresSafeArea(.keyboard) doesnt work


How you can maintain that backside label keep on with the underside when keyboard seems?

Right here is the code:

struct StartView: View {
    @State non-public var choice = 1
    var physique: some View {
        RoundedTabView(selectedTab: $choice)
    }
}

struct RoundedTabView: View {
    @Binding var selectedTab: Int
    
    var physique: some View {
        ZStack(alignment: .backside) {
            TestView()
            ZStack{
                Textual content("ought to be sticked")
            }
        }
    }
}

struct TestView: View {
    @State var textual content = "hejka john textual content subject"
    var physique: some View {
        ZStack {
            Colour.orange
                .ignoresSafeArea()
            TextField("", textual content: $textual content)
                .multilineTextAlignment(.heart)
        }
    }
}

IMPORTANT:

It ought to stick solely that label, not the TextField itself. TextField ought to transfer up when keyboard seems and if at the moment is underneath the keyboard.

enter image description here
enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments