The inputView UITextField property is nil by default, which means that the standard keyboard is displayed.
If you assign it a custom input view or just a dummy view, the keyboard will not appear, but a blinking cursor will still appear:
UIView* dummyView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)]; myTextField.inputView = dummyView;
If you want to hide both the keyboard and the blinking cursor, use this approach:
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField { return NO;
RohinNZ Dec 02 2018-11-12T00: 00Z
source share