0
votes

I use the following delegate to receive any keyboard changing actions. There was no problem until iOS 6 so far, but I came up against one problem in iOS 7.

- (void)textViewDidChange:(UITextView *)textView

My app should support Korean language.

I can explain the problem using simple example to understand it easily.

[Action Flow]
1) '러러' is showed in UITextView now.
2) an user touches delete key once.
3) '러러' is changed to '럴'.

I expect to be called [(void)textViewDidChange:(UITextView *)textView] just one time.
It works well under iOS 6!

In iOS 7, however, the delegate is called three times like that flow

'러러' --> '러'
'러' --> empty
empty --> '럴'

my app is dealing with carefully the delegate to control text contents of UITextView. Therefore, I don't want to receive a delegate message about intermediate steps.

Simply, I really want to use UITextView and its delegate same to the way that it works under iOS 6.

1
Sounds like a bug in UITextView, open a radar and get feedback from the apple engineers.radar.apple.combtype
Can you tell where you have set delegate in your code?sathiamoorthy
@sathiamoorthy There is a viewcontroller who has one UITextView. the viewcontroller is set as UITextView's delegate. and It also has implementation of UITextView's delegates.Kyokook Hwang
No. I am asking, whether it is in ViewDidLoad or cellForRowAtIndexPath.sathiamoorthy

1 Answers

0
votes

You may use the following code,

[[NSNotificationCenter defaultCenter]
 addObserver:self
 selector:@selector(methodNothing)
 name:UITextFieldTextDidChangeNotification
 object:firstName];

and you can use:UITextFieldTextDidBeginEditingNotification or UITextFieldTextDidEndEditingNotification