In ios, click UITextfield to prevent the keyboard from being popped up, And the UIPicker method is displayed.

Source: Internet
Author: User

In ios, click UITextfield to prevent the keyboard from being popped up, And the UIPicker method is displayed.

 

I haven't been here for a long time. Please visit here now! Tips!

Drag a picker, and set the pickden of the picker to yes,

Then add a touch down event to your Textfield,

Then the code is as follows:

-(IBAction) select :( id) sender {pickerView. hidden = NO ;}
Then
-(Void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view. coursetime. inputView = [[UIView alloc] init]; Coursetime. inputView. hidden = YES ;}
In this way, picker will appear when you click Textfield. As for how to display it next, we will surely all be done. I will not say much about it in the editor! Come on, friends!

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.