I am trying to disable the return key found when typing in a UITextView. I want the text to have no page indents like found in a UITextField. This is t
UITextView
UITextField
Another solution without magic hardcoded strings will be:
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText: (NSString *)text { if( [text rangeOfCharacterFromSet:[NSCharacterSet newlineCharacterSet]].location == NSNotFound ) { return YES; } return NO; }