becomeFirstResponder after reloadData

An app I'm working on now has a view controller that's used to edit model details. A UITextView present on one of the table view cells becomes the first responder when the controller is displayed, so the keyboard is up and ready for input.

It's possible for this controller to hang around and be re-used, so the code in viewDidLoad doesn't necessarily run each time the controller is presented. In order to make sure the correct data was presented each time, I added a reloadData call to viewWillAppear:

After doing that, I noticed that the keyboard only came up the first time the controller was presented, despite there being a call to becomeFirstResponder each time the cell with the text view was built (if I had static cells I'd becomeFirstResponder in viewWillAppear).

I fiddled with various things to try and get this to work, thinking that maybe reloadData destroyed the cell before its text view could resign properly.

After some searching I stumbled on this post (uggh, and was a little shocked when I realized it was mine from a couple years ago).

Once I saw that I replaced the brutish reloadData call with a reloadSections:withRowAnimation: call. This change allows the cell with the UITextView (or UITextField) to becomeFirstResponder each time.