Uitextfield Click event---does not trigger the keyboard popup, triggering the implementation of other events.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.