I am new to iphone. I am working on first application in iphone. I have a view, which contains an UIButton. when I clicked on this button, It will display UIPickerview. How can i do this? Can any one please tell me with proper example or sample code ?
Asked
Active
Viewed 183 times
1 Answers
0
In viewDidLoad write
picker.hidden=TRUE;
and when you click on button make
picker.hidden=FALSE;
also you have to write picker's delegate methods for displaying data in it..
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component;
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView;
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component;
-
Thank you for your valuable suggestion – user553215 Dec 28 '10 at 04:40