How to set UITextField setInputView to UIPickerView - iphone OS:3.1.2
<p>I have created a UITextField along with UIPickerView programmatically and set the input view
of the text field to picker view but when i upload this test application to the iphone test device with iPhone OS: 3.1.2 it crashes on [textfield setInputView:picker] execution, however the same test application works fine if uploaded on iphone test device with iphone OS: 4.1. Please let me know how could i make it work on iphone OS:3.1.2 </p>

<p>Thanks</p>

<pre><code>UIPickerView* picker = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f, 480.0f, 320.0f, 270.0f)];
picker.delegate = self;
[TestViewController addSubview:picker]; 

UITextField* textfield = [[UITextField alloc] initWithFrame:CGRectMake(145.0f, 97.0f, 155.0f, 29.0f)];
textfield.delegate = self;

[textfield setInputView:picker];    // Crashes on execution
[TestViewController addSubview:textfield];
</code></pre>
