I want to render only images with SECoreTextView. I have an attributedString: ** (three \ character without format) and and array images. I render these images using SECoreTextView with this helper method:
[SETextViewHelper insertImageToTextView:seTextView fromComponents:data];
//attributedString is ***
[richTextView setAttributedText:[SETextViewHelper attributedStringFromComponents:attributedString]];
IOS 7, everything is OK but in iOS 6 the problem is SETextLayout will return wrong number line of CTFrame (in this case CTFrameGetLines(_frame) return 0) so no thing is rendered.
I can fix this by using the trick that append original attributedString with an character (any character, in my case is space character) and do the same thing above. After do this trick, all images will be rendered and everything is fine.
I want to render only images with SECoreTextView. I have an attributedString: ** (three \ character without format) and and array images. I render these images using SECoreTextView with this helper method:
Add Image to textview
IOS 7, everything is OK but in iOS 6 the problem is SETextLayout will return wrong number line of CTFrame (in this case CTFrameGetLines(_frame) return 0) so no thing is rendered. I can fix this by using the trick that append original attributedString with an character (any character, in my case is space character) and do the same thing above. After do this trick, all images will be rendered and everything is fine.
This issue is something happened like this: http://stackoverflow.com/questions/18703672/ios-method-ctframegetlines-return-empty-array
Please see these images for more details: