I want to display a picker when the user clicks on a button I subclassed the UIButton and changed its inputview so that it is writable.
I followed this link http://
The inputView
property is only the part of UITextField
and UITextView
not UIButton
.
@property (readwrite, retain) UIView *inputView;
Although you could achieve the same using UIButton
.
Create an UIButton
object then set an action method and add your picker view in parent view of your button in the action method of UIButton.
Should be something like that.
-(void) buttonClicked:(id) sender
{
[self.view addSubview:myPickerView];
}