Hello all,
I am relatively new to iOS development.
In my universal app, for iPad, I have an UIPopoverController over which I want to display an UIPickerView's object _pickerView.
I create the UIPickerView object and set it's delegate and datasource as self and also implement the 3 datasource and 1 delegate method of UIPickerView.
Now when I try to add the UIPickerView object as subview to to UIPopoverController object's view, I don't see the UIPickerView being displayed at all. I only see the blank popover control being shown.
The code used to add the picker view to popoverController is provided below.
What am I doing wrong for iPad?.
I execute the below mentioned code for iPhone device which works fine.
I am relatively new to iOS development.
In my universal app, for iPad, I have an UIPopoverController over which I want to display an UIPickerView's object _pickerView.
I create the UIPickerView object and set it's delegate and datasource as self and also implement the 3 datasource and 1 delegate method of UIPickerView.
Now when I try to add the UIPickerView object as subview to to UIPopoverController object's view, I don't see the UIPickerView being displayed at all. I only see the blank popover control being shown.
The code used to add the picker view to popoverController is provided below.
Code:
[self.popoverController.contentViewController.parentViewController.view addSubview:_pickerView];
//note: popoverController is an object of UIPopoverController.
What am I doing wrong for iPad?.
I execute the below mentioned code for iPhone device which works fine.
Code:
[self.view.window addSubview:_pickerView];