Thursday, 15 May 2014

objective c - Allowing user to select a UIPickerView row by tapping and hide the picker -



objective c - Allowing user to select a UIPickerView row by tapping and hide the picker -

i added pickerview textfield, want allow user tab on selected row , item must show in textfield und pickerview must hide.

i seek not work.

any help here?

- (void)textfielddidbeginediting:(uitextfield *)textfield { uipickerview *pickerviewgeschlecht = [[uipickerview alloc] init]; pickerviewgeschlecht.datasource = self; pickerviewgeschlecht.delegate = self; uitapgesturerecognizer *mygr = [[uitapgesturerecognizer alloc] initwithtarget:self action:@selector(pickertapped:)]; [pickerviewgeschlecht addgesturerecognizer:mygr]; self.txtgeschlecht.inputview = pickerviewgeschlecht; } - (void) pickertapped:(uitapgesturerecognizer*)gesturerecognizer{ txtgeschlecht.text = ausgewaehltesgeschlecht; }

i having same problem. works great in ios 6.x seems functional changed in ios 7.x. tapping seems default picking row tapped, , can no longer set own tap gesture. there must me simple boolean value have set, can't find anywhere.

allowing user select uipickerview row tapping

this might how have handle tap now, solution of putting clear uicontrol on picker , attaching tap action puckers delegate.

objective-c xcode uipickerview

No comments:

Post a Comment