In the process of doing the project today, there are three controls:
Uitextfield, Uitextview, UILabel, later found a problem: if what data are not backfill to Textfield.text and Textview.text pass is: Textfield.text = Textview.text =. (In fact, it is an empty string), but the label is not, the log is: Label.text = (null). This value will always cause the program to crash. Tried several ways to modify the Label.text, but in the end there was no success. Finally, the label control will be converted to Uitextfield better. The function to be implemented is: Click Uitextfield to jump to another page to get the data, and then backfill it to Uitextfield.text. At first, I wanted to add a series of actions, such as a click Gesture to Uitextfield, but it was useless. Finally, a good solution was found. 1. No need to add click Gestures 2. Implement the Proxy method.
-(BOOL) textfieldshouldbeginediting: (Uitextfield *) textfield{
Write what you want to achieve: page Jump related code
return NO;
}
Uitextfield Click event---does not trigger the keyboard popup, triggering the implementation of other events.