Created
October 1, 2012 18:46
-
-
Save gdavis/3813665 to your computer and use it in GitHub Desktop.
Display popover for textfield
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField | |
{ | |
// prevent the start date from manually entering text. | |
// instead, we display a popover with a date picker | |
if (textField == self.startDateField && self.popover == nil) { | |
[self.view endEditing:NO]; | |
[self presentDatePickerFromField:textField pickerID:nil]; | |
return NO; | |
} | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment