0

I am having trouble why my navigation bar pushed upward when keyboard shows up (refer to the first image). Unlike to the second image (iMessage screenshot), the navigation bar doesn't pushed upwards when keyboard.

enter image description here

enter image description here

Here is my code

import SwiftUI

struct ConversationView: View {
    @State var message : String = ""
    var body: some View {
        VStack {
            Spacer()
            Divider()
            TextField("Write a message here .....",text: $message)
                .padding(.all,10)
                .overlay(
                    RoundedRectangle(cornerRadius: 13)
                        .stroke(Constants.black_100, lineWidth: 1)
                )
        }
        .padding(.all,5)
    }
}
Mactacs
  • 70
  • 1
  • 8
  • Not an answer because this doesnt keep the navBar in place, but maybe you are intersted in something like this: `navigationController?.hidesBarsWhenKeyboardAppears = true` – stackich Oct 08 '20 at 07:14
  • Thank you for the response. But how do apple did on iMessage app? @stackich – Mactacs Oct 08 '20 at 07:21

0 Answers0