IQKeyboardManager + UITextFeild keyboard pop-up flash of color problem

Requirements: screen appears, the first response to the textFeild

Problem: When the keyboard has toolBar (toolbar), if we set becomeFirstResponder in viewDidLoad, the keyboard will pop-up screen appears and synchronization, but the keyboard will disappear first, and then a darker color appears, it seems a bit strange

Solve the problem: There are two methods, one may be placed after the pop-up keyboard interface appears, i.e., a text box is provided in viewDidAppear become the first responder, so that the problem does not appear the color of the flash; 2, a custom keyboard toolBar, textField have a inputAccessoryView property is a toolbar view, we can customize it, put it in the creation of textFeild set, then set becomeFirstResponder, keyboard viewDidLoad will not appear in the pop-up flash of color, keyboard can be achieved with simultaneous interface

Guess you like

Origin www.cnblogs.com/xiaonizicome/p/12022991.html