I’m part way through the chapter and I’ve formed a different opinion. On page 257 (printed version at least, it’s the last part of the section Dismissing by tapping elsewhere) they have you dismiss the keyboard when the detail view is going offscreen. So when you tap Back, the keyboard slides down and the detail view slides to the right. I think having the two bits slide off the screen in different directions looks odd and I prefer the way it was before adding view.endEditing(true)
where they slid together to the right.
I tried to find something on my iPhone that worked that way but I haven’t come across anything yet. Things I tried in Settings where the keyboard appeared kind of all disappeared in a jumble when I dismissed them.
Does anyone else think it’s better to have both slide together like I do, or is this an iOS convention/HIG I missed?
One more thing. I noticed the intro text on this page says, “When the user taps the back button, … the keyboard disappears instantly, with no animation.” That’s not happening in my case without the additional code. Maybe iOS 14 improved it and previous versions didn’t animate the keyboard, but I don’t know how to test that with a simulator (my real devices are both on iOS 14).