I really don’t know what possessed the people at Apple to make the UIPickerView transparent by default; it can make it very difficult to distinguish the items in the list from what is underneath.
In the FireMonkey TComboBox in Delphi XE5, the picker is implemented using the native UIPickerView. The way the picker is implemented, it makes it close to impossible to change its properties without modifying the FMX source. There is another way, however it is a way more complex hack and I won’t go into it here.
This method is far simpler, as long as your edition of Delphi includes source. To make the picker opaque, you can copy the file FMX.Pickers.iOS.pas (in the <DelphiDir>\source\FMX folder) to your project directory, and make the following change:
constructor TListBoxPopupDialog.Create;
begin
inherited Create;
FValues := TNSMutableArray.Create;
// ListBox picker
FListBoxPicker := TUIPickerView.Create;
FListBoxPicker.setFrame(GetContentFrame);
FListBoxPicker.setShowsSelectionIndicator(True);
FListBoxPicker.setAutoresizingMask(UIViewAutoresizingFlexibleWidth);
FDelegate := TPickerDelegate.Create(FValues);
FDataSource := TPickerDataSource.Create(FValues);
FListBoxPicker.setDataSource(FDataSource.GetObjectID);
FListBoxPicker.setDelegate(FDelegate.GetObjectID);
FListBoxPicker.setBackgroundColor(TUIColor.Wrap(TUIColor.OCClass.whiteColor)); // <-- ADD THIS LINE
FUIContainerView.addSubview(FListBoxPicker);
end;
Now the combo box picker will be opaque. Note: This applies to the device only. For some reason I am yet to work out, the old style picker shows on the simulator.
I agree completely. When I saw the transparent picker I thought that is ugly.