While writing a UITextView control, I realized that if I change the width (via setFrame) of the view on scale gesture, the word wrap gets screwed up. It becomes prominent on rescaling multiple times.
By screwing up, I mean that the text starts wrapping from a smaller frame/rectangle than the current width of the textview. This is what I am doing on scale gesture:
[textview setFrame:CGRectMake(textview.frame.origin.x, textview.frame.origin.y, textview.frame.size.width * [gestureRecognizer scale], textview.frame.size.h开发者_高级运维eight )];
Also, if it helps to debug, I have subclassed the UITextView and set the canBecomeFirstResponder
to NO
to block the keyboard & menu. Also I have disabled scrolling by setScrollEnable:NO
and setEditable:NO
精彩评论