Ad

Our DNA is written in Swift
Jump

DTCoreText 1.6.14

This maintenance release for DTCoreText addresses one pressing issue with images represented in data URLs and a collection of a few contributions.

Changes

  • FIXED: Parsing @2x Image in data URL causes it to double in size
  • FIXED: In Demo app, image elements seem to block scrolling in iOS 8
  • FIXED: Missing Helvetica Neue Italic font in iOS 7.0.x would cause crash
  • FIXED: Potential memory leak in -newMatchingFont
  • FIXED: Potential crash from iOS bug, calling -accessibilityElementAtIndex: with non-existing index
  • ADDED: Override -coretext-fontname to use direct “PostScript” names for fonts

I was particularly astonished that the image growing issue in data URLs was not spotted any sooner. The problem there was that the persisted NSData from an image would contain all the pixels, but lose the information about the scale factor. This caused the pixel size to end up being used, as opposed to the point size.

The scrolling problem resulted from UIScrollView causing a viewDidLayoutSubviews as well in the view it is contained in, beginning with iOS 8. The demo is long overdue to be switched to storyboard, and so there is is currently a workaround in place that adjusts the contentOffset and various insets based on the layout guides. This is done exactly in the mentioned method. This would cause the contentOffset to be reset to the top whenever something in the scroll view triggered a layout.

This release benefitted from contributes by Jean-Charles BERTINSteve Pint and Jan Thiele. Thank you!

The updated is tagged on GitHub and also available via Cocoapods trunk. If you are using DTRichTextEditor via pods you also get this automatically if you pod update.


Tagged as:

Categories: Updates

Leave a Comment