if (select == 2) {
[self.habitField resignFirstResponder];
[self.habitField setInputView:nil];
[self.habitField becomeFirstResponder];
}
This is basically hiding the UIPickerView then removing it and then popping up the keyboard.
If you want the UIPicker buck up use this code:
[self.habitField resignFirstResponder];
[self.habitField setInputView:PickerData];
[self.habitField becomeFirstResponder];