开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜