Programmatically Select all text in UITextField

How can I programmatically select all text in UITextField?

Turns out, calling -selectAll: with a non-nil sender displays the menu. Calling it with nil causes it to select the text, but not display the menu.

I tried this after my bug report about it came back from Apple with the suggestion that I pass nil instead of self.

No need to muck with UIMenuController or other selection APIs.