Can not type text in textview
ios, iphone, objective-c, uitextview
Solution
You should not return NO in ...
`-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text`
otherwise it will not allow you to add text.
Edit: From `TextView` reference:
textView:shouldChangeTextInRange:replacementText: Asks the delegate whether the specified text should be replaced in the text view.
(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
Parameters:
textView: The text view containing the changes.
range: The current selection range. If the length of the range is 0, range reflects the current insertion point. If the user presses the Delete key, the length of the range is 1 and an empty string object replaces that single character.
text: The text to insert.
Return Value: YES if the old text should be replaced by the new text; NO if the replacement operation should be aborted.
Problem
I have an editable textview to enter some description . when i click on the textview the keyboard appears. My problem is when i try to enter some text via keyboard it is not coming in the textview. Please help me thanks in advance.