Reputation: 10437
I'm not able to find examples for this, Can someone help - I need to create PickerView triggered from clicking a UIButton, filling data from Array or Dictionary without using .xib designer.
Upvotes: 1
Views: 289
Reputation: 10011
in the IBAction
method of the UIButton
you can do
- (IBAction)buttonPressed
{
UIDatePicker *myPicker = [[UIDatePicker alloc] initWithFrame:pickerFrame];
[self.view addSubview:myPicker];
[myPicker release];
}
you would have to implement the delegate and datasource methods to show the picker and its contents.
Upvotes: 1