Skip to content

Releases: zacwest/ZSWTaggedString

Swift 5

12 May 20:21
Compare
Choose a tag to compare
  • Update to Swift 5 (no actual source changes).
  • Fixes crashing on strings like <blah></blah> with dynamic attributes.

Swift 4.2 support

26 Jan 20:05
Compare
Choose a tag to compare

Update to Swift 4.2.

Swift 4

16 Oct 21:28
Compare
Choose a tag to compare

Updates for Swift 4.

Swift 3

21 Jan 22:11
Compare
Choose a tag to compare

Updates for Swift 3.

Swift support

14 Dec 03:43
Compare
Choose a tag to compare

Swift support! You will need to add the ZSWTaggedString/Swift dependency for this. This provides a cleaner API for setting attributes for tags, for example:

options["a"] = .Static([
    NSForegroundColorAttributeName: UIColor.whiteColor()
])

options["b"] = .Dynamic({ tagName, tagAttributes, existingAttributes in
    if tagAttributes["white"] != nil {
        return [
            NSForegroundColorAttributeName: UIColor.whiteColor()
        ]
    } else {
        return [
            NSForegroundColorAttributeName: UIColor.redColor()
        ]
    }
})

This release also fixes ZSWTaggedString initialization methods init(string:) and init(format:...) under Swift.

Incompatibility notes:

  • ZSWTaggedString no longer accepts nil input; it will convert any nil input into @"".
  • ZSWTaggedStringOptions.returnEmptyStringForNil flag has been removed.

Escaped string fix

24 Jun 18:20
Compare
Choose a tag to compare

Fixes some cases where escaped strings containing < failed to include the escaped < (though they parsed without error).

Initial release

23 Feb 00:05
Compare
Choose a tag to compare

Done over the weekend while sick, so hopefully not full of too many bugs.