iosios7uitextviewnstextstoragenstextcontainer

UITextView becomes unselectable when using textstorage with textcontainer in iOS


I am trying to display NSAttributedString to UITextView. I have used NSTextStorage, NSLayoutManager and NSTextContainer. But what happens is UITextView becomes unselectable. When i try to select , i can't find any selection or copy - paste options.

I have given textview.selectable=YES

I have used multiple textviews with same textstorage. Is that the reason for this problem ?? Or do I have to enable anything else ???


Solution

  • solved that issue myself !!!!

    I believe its the problem when we use same storage and different UITextViews ie. splitting content to different textviews. I didnt find any solution for that.

    I solved it by omitting storage, container, & layout manager and by implementing the same features by other way.