开发者

how can I hide my UIPickerView on viewdidload & show it on buttonclick? [closed]

开发者 https://www.devze.com 2023-01-30 05:47 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 2 years ago.

开发者_运维知识库 Improve this question

how can I hide my UIPickerView on viewdidload & show it on buttonclick?


In your ViewDidLoad method you'll hide it by simply setting its hidden property to true:

myPickerView.hidden = YES;

Then in your button's TouchUpInside event you simply set the pickerView's hidden property to false:

myPickerView.hidden = NO;


use in viewDidLoad

[myPickerView removeFromSuperView];

and on buttonClick

[self.view addSubView:myPickerView];

0

精彩评论

暂无评论...
验证码 换一张
取 消