Ravi Ravi - 4 months ago 5
iOS Question

When I tap the TextField and don't show the keyboard. How can i use?

I am new iOS Application Developer. and I want to try when i tap the

and don't show the keyboard but
to tap then show the cursor point will be show. how can i try this?
i want try this code but it did't work.

- (void)textFieldDidBeginEditing:(UITextField *)textField
[textField resignFirstResponder];



You can call the Function.

and implement the .h file.

@interface ViewController : UIViewController<UITextFieldDelegate>

implement the .m file.

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
    if (!textField.inputView) {
        //it hides the keyboard, but cursor will show
        textField.inputView = [[UIView alloc] initWithFrame:CGRectZero];
    return YES;

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
    return NO;