Skip to content
AliSoftware edited this page Oct 11, 2013 · 43 revisions

Revisions History

This page lists the major changes that appeared across the various OHAttributedLabel versions / git tags.

You can see and download any tagged version of OHAttributedLabel here (or simply specify a specific version in your Podfile if you use CocoaPods).


Versions 3.x.x

Versions 3.5.x

Version 3.5.2

  • Definitely dropping ARC support

(This is mainly to avoid leak cases with non-ARC — like the one fixed in 3.5.1 — as I don't test non-ARC anymore and to ease future maintainability)

Version 3.5.1

  • Fixing a leak in UITouchGestureRecognizers when not using ARC (see #161)
  • Fixing an issue with text highlight (see #162)

Thanks to @mattjgalloway for all these great Pull Requests lately 👍

Version 3.5.0

  • Optimisations on constructor (canOpenURL:)
  • Add support for character spacing in NSAttributedString+Attributes.h (#127)
  • Fix bug with links (when label only contained custom links, etc) (#135, #136)
  • Fixed OHASBasicMarkupParser detection RegExes (#150)
  • Now also supports building fat static library (in addition to CocoaPods or manual integration in the workspace) (#132)
  • Migrated to gesture recognizers instead of touch events (#134)

Versions 3.4.x

Version 3.4.3

  • Fixed a crash in iOS5 introduced by 3.4.2

Version 3.4.2

  • Fixed warnings for Xcode 5

Version 3.4.1

  • Links can now optionally be activated on touchBegan instead of touchEnded
  • Tested on Xcode 4.6 and iOS 6.1, and fixed some new warnings about implicit conversions
  • Improved the hack for the private iOS font .HelveticaNeueUI variants

Note that the hack for the .HelveticaNeueUI font family was introduced to fix an Apple bug on this font (which failed to find its bold and italic variants on prior versions of iOS) but this Apple bug seems to have been fixed on iOS 6.1, so the hack is now only useful for users still running iOS versions prior to iOS 6.1

Version 3.4.0

  • Added "setTextItalics:" method
  • Added support for italics in Markup Parsers (|some text| for OHASBasicMarkupParser, <i>some text</i> for OHASHTMLMarkupParser)
  • Changed the integration process to a more elegant and clean solution, easier to integrate in your application. Now use again #import <OHAttributedLabel/OHAttributedLabel.h>… but no need at all to add the relative path to "Header Search Path" anymore!

Versions 3.3.x

Version 3.3.0 - Paragraph Styling (Line Height, Paragraph Spacing, Identation…)

  • Added OHParagraphStyle class that allows you to easily change a whole new set of styles on your NSAttributedStrings. This includes the possibility to control:
  • The line height (#41) of your paragraphs,
  • The spacing between paragraphs,
  • Line indentation (#109) of your paragraphs (first line indent, other lines head and tail indent…)
  • And you can also change the text alignment and line breaking mode using this new API instead of the old setTextAlignment:lineBreakMode:range: method.
  • Fixed the setTextAlignment:lineBreakMode:range: method to use the new API internally. This fixes the issue with the previous code which did override any other existing paragraph styles if any (like line height, indentation, etc).
  • Added beginEditing/endEditing calls to methods that generate multiple attributes changes at once (setTextBold, modifyParagraphStylesWithBlock:). This should avoid useless consolidation and KVO notifications during the change.
  • Fixed small issues in code consistency (#107, #108)
  • Updated Demo project to demonstrate these new features

Versions 3.2.x

Version 3.2.5 - Minor fixes

  • Minor fixes concerning vertically centering
  • Added LICENSE header in files where it was missing

Version 3.2.4 - Fixed warnings & leak

  • Fixed leak on CTFontCreate when in ARC
  • Added #warnings for users who didn't integrate the library the right way (and messed with the library build settings). This is to avoid complaints afterwards from users that have issues just because they didn't even follow the README instructions to integrate the library to their project.

Version 3.2.3 - Markup Parsers now multiline-aware

  • OHASMarkupParsers now allows markup tags to enclose text containing line separators (text on multiple lines)

Version 3.2.2 - Fixes for ARC compilation

  • Even if OHAttributedLabel is designed to be compiled in its own workspace with its own compilation settings, namely without ARC, this commit fixes cases when you try to compile it using ARC anyway.

Version 3.2.1 - Renamed private method to avoid naming collisions

  • UIColorFromString renamed to OHUIColorFromString to avoid naming collision (for example with MagicalRecord that uses a function with the same name)

Version 3.2.0 - Added link attribute to NSAttributedString

  • NSAttributedString+Attributes now has linkAtIndex:effectiveRange: and setLink:range:methods to add links to a NSAttributedString directly.
    This method use an attribute named kOHLinkAttributeName to add to the attributed string. (This constant is equal to the value @"NSLinkAttribute" which is the value used in OSX, so that if this attribute is ported to iOS in a future iOS version, it will probably work with it too)
  • OHASBasicHTMLParser now support <a href="someURL">some text</a> tags to add links
  • OHASBasicMarkupParser now support [some text](someURL) markup to add links

Note that now that it is possible to add links directly to NSAttributedStrings, it is the preferred way to add links to a text (instead of calling addCustomLink:inRange: on the OHAttributedLabel), so that the link is attached to the string and not the label that displays it.

Versions 3.1.x

Version 3.1.1 - Fix issues, added @autoreleasepools

  • Removed "Installation" phase from compilation (Skip Install = YES) to avoid mess like in #90.
    Now we are back to straight quoted-style imports #import "OHAttributedLabel.h" (instead of square braquets) but users must add the path to the OHAttributedLabel headers to their project's "User Header Search Paths"
  • Added some @autoreleasepool to reduce memory footprint, some code reformatting
  • Fixes #55 and #99

And improved TableView example to show how to manage variable cell heights depending on NSAttributedString size.

Version 3.1.0 - Added possibility to set bold style for links

  • Now you can bitwise-OR the linkUnderlineStyle (the property as well as the one used in the delegate method) with kOHBoldStyleTraitSetBold or kOHBoldStyleTraitUnSetBold to change the font weight used for links.

Versions 3.0.x

Version 3.0.1 - Minor Fixes

  • Fixed crash in OHASMarkupParsers when empty match (when no text between opening and closing markup)
  • Fixed library Deployment Target (#93)

Verison 3.0.0 - Cleaner API for markup parser classes

  • Renamed OHASTagParser* classes to OHAS*Parser names invoking markup and not tags (as it is more flexible that just HTML tags).

Versions 2.x.x

Versions 2.2.x

Version 2.2.0 - Very simple HTML or markup tags support

  • Added OHASTagParser classes to build NSAttributedString using simple HTML (<b>, <u>, <font name=… size=…>, <font color=…>) or simple markup tags ("*bold*", "_underline_", "{red|red text}"…)
  • Improved memory usage for link detection by recycling NSDataDetector instances. This also improves stability (as the DataDetectorCore library does not like to be stressed)
  • This also fix an issue where textIsUnderlinedAtIndex:effectiveRange: returned the opposite value of the one expected.

Versions 2.1.x

Version 2.1.1 - iOS6 compatibility & standalone library

  • Removed iOS6 warnings.
  • Modified the project to create a separate library libOHAttributedLabel.a, to facilitate integration using an Xcode 4 workspace (see example and README

Version 2.1.0 — UIAppearance support and optimizations

  • Adds UIAppearance support for iOS5, to let you easily customize the link color and style of all of your OHAttributedLabel instances for your whole app, to fit your application design.
  • Optimize the calls to recomputeLinksInText, to prevent the computation to be done multiple times (i.e. each time we change one of the properties) per RunLoop and enforce it to be done only once per RunLoop iteration. (Meaning it now uses the pattern similar to the setNeedsDisplay methods, only setting a flag to trigger the computation only once when needed).

This last optimization should reduce the time used especially when you change multiple properties in a row.

Versions 2.0.x

Version 2.0.0 — Change in delegate API

  • Changed the name of the delegate method from colorForLink:underlineStyle: to attributedLabel:colorForLink:underlineStyle:.

This is the only change since 1.3.1 but it had to be done to better fit the naming conventions, and is needed if you want to return the default link color and underline style from your delegate methods depending on some conditions.

Besides, as it changes the delegate API, and this version as been retested for various bugs and considered stable enough, it was time to increase to the next major version.

Important Note

If you update from a previous version, be sure to update your code to change the method signature in your delegate implementation to the new one! (As the previous delegate method signature will stop being called in this new version, the new one being used instead)

Versions 1.x.x

Versions 1.3.x

Version 1.3.1 — Optimizations

  • Optimizations for links computation, by avoiding to allocate an NSDataDetector at each computation of the links (but allocating it once, when automaticallyAddLinksForTypes changes).

This trick may be simple but increase performance a lot compared to 1.3.0 especially when OHAttributedLabel is used in a UITableViewCell, as links are recomputed each time a cell is reused and its attributedText property is set to a new value.

Version 1.3.0 — Optimizations

  • Various drawing optimizations, especially by now keeping the NSAttributedString with detected links in cache instead of recomputing the automatically detected links each time (at each redraw).
  • Fix regressions introduced in 1.2.0 (especially on highlightedLinkColor and some text color issues)
  • Adds the NSTextCheckingResult addition to retrieve preformatted NSURL for Google or Apple Maps app.

Versions 1.2.x

Version 1.2.0 — ARC support, iOS6 compatibility

  • ARC support
  • The class has been tested with the iOS6 Beta SDK
  • Depreciation of fake constant UITextAlignmentJustify because it now throws an exception in iOS6. Use setTextAlignment:lineBreakMode: on your NSAttributedString instead now.
  • Added warnings for known issues (for properties not supported by CoreText)
  • Accessibility label now updated when text is updated
  • some performance (customLinks allocation deferred, attributedTextWithLinks not copied anymore -- note that this introduced a regression that was fixed in 1.3.0 -- and respondsToSelector: check cached)

Versions 1.1.x

Version 1.1.3 — Minor fix for accessibility

  • Fixed #56 : Accessibility label not being updated when attributed text is set

Version 1.1.2 — Minor fix for brief touches

  • Fixed #52 : Fixes issue where brief touches on a link are ignored

Version 1.1.1 — Fix Leaks

  • Fixed Apple leak (adding an attribute on an NSAttributedString does not release the previous affected attribute) and removed some warnings about undeclared private methods.

Version 1.1.0 — Link detection for any type

  • Generalized automatic link detection to any NSTextCheckingType allowing links of any kind to be detected automatically.
  • Added setTextIsBold:range: method to change the font variant easily, even across CTRuns that use different fonts.
  • Tried to add subscript/superscript support in NSAttributedString+Attributes, but aborted since quite no CoreText font support it in practice.

Versions 1.0.x

Version 1.0.0 — First stable release. Optimizations + Xcode4/LLVM compatibility

  • Optimized CTFrame computation, fixed leaks, fixed link touch detection when centerVertically=YES and various other bug fixes.
  • Also fixed Clang-LLVM and Xcode4 warnings (version before 0.0.4 was developed with GCC & Xcode3)
  • First version considered stable and trustworthy for production

Versions 0.x.x

Version 0.3.0 — Bug Fixes

  • Bug fixes & merge of various pull requests.
  • Especially adding link color and underline style properties, fixed sizeThatFits and various links touches detection, and added initWithFrame: (before 0.0.3 only initWithCoder: was implemented)

Version 0.2.0 — Links

  • Added links autodetection

Version 0.1.0 — First basic version

  • First and basic pre-release version
Clone this wiki locally