Swift: Become First Responder on UITextField Not Working?
问题 I've created a custom UIViewController with one UITextField on Storyboard. On viewDidLoad , I set the UITextFIeld to becomeFirstResponder , nothing happened (no keyboards popped up). I then tried calling resignFirstResponder() , but it returned false. Next I tried to find who the first responder is through looping all the subviews using the code over @ Get the current first responder without using a private API. It turns out none of the sub views are the first responder. My ViewController in