Following the public availability of iOS 7 and having collected a good amount of fixes, I felt that it is a good time to release the next maintenance update to DTCoreText.
Changes
- FIXED: Paragraphs within list items render incorrectly
- FIXED: Reformatting URLs embedded in iframe for YouTube
- FIXED: Performance degradation when using padding in iOS 7
- FIXED: Crash when using iOS6 Attributes and Drawing Underline on iOS 7
- FIXED: Crash on iOS6 caused by DTAttributedTextCell iOS 7 workaround
- FIXED: Indenting for DTAttributedTextCell when used in grouped tableview
- FIXED: DTHTMLWriter does not output inline styles for UL/OL
- FIXED: DTHTMLWriter outputs empty span tag following LI
- FIXED: background-color is not transferred from UL style to LI
- ADDED: Option to skip font setup for use-cases not requiring CSS parsing
- ADDED: Tab stop support in modern attributes’ NSParagraphStyle
- CHANGED: Moved hex methods for color into DTColorFunctions
iOS 7 finally adds public API for tab stops in NSParagraphStyle. So I implemented the bridging of these from and to DTCoreTextParagraphStyle. This fixes the list indentation and makes it possible to use DTCoreText for one more use case on iOS 7. This functionality is only available if you build with iOS 7 SDK and the app is executing on iOS 7. Elsewhere this functionality is dormant, or if you are building with iOS 6 SDK #defined out.
In particular I would like to point out a difference in how iOS 7 seems to handle custom attributes backed by an array. Apparently iOS 7 compares such arrays now and this got stumped by DTTextBlock missing an efficient isEqual: method. This was tricky to discover, but Konstantin Boukreev rose to the challenge. I also added an isEqual: to list styles and improved it for font descriptors for good measure.
The update is tagged on the master branch on GitHab as well as available via CocoaPods.
Categories: Updates
“FIXED: Crash when using iOS6 Attributes and Drawing Underline on iOS 7”
I think this fix bonked the rendering of underlines for tags. I have a simple example that refused to render the underline even if I added a tag inside. I also turned on the DTDefaultLinkDecoration options w/o any change. Any place better I could post the code/HTML for this?
I am not able to set custom fonts by usint DTCoretext text 1.2.7 to DTAttributedTextView
I added custom font to info.plist file of my application.
I set that font to DTAttributedTextView using DTDefaultFont family.But default font is getting set to text.
loading content with custom font taking long time in iOS7