how can I hide my UIPickerView on viewdidload & show it on buttonclick? [closed]
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 questionhow 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];
精彩评论