github Rightpoint/BonMot 3.0.0.beta.1

latest releases: 6.1.3, 6.1.2, 6.1.1...
pre-release8 years ago

See all commits since the last release here

New Features and Major Changes

  • Added new UIKit utilities, available via the new BonMot/UIKit subspec, which make it easy to configure labels, text fields, and text views with text from BonMot. (#68, @Imperiopolis)
  • Added -[NSAttributedString bon_humanReadableString], which expands special characters out into human-readable strings. This is useful for writing unit tests where you need to compare a BonMot-generated string with an example string which may contain invisible or hard-to-read characters. For example, a string with an embedded image, a non-breaking space, and some text that contains an en dash might be expanded as {image24x36}{noBreakSpace}Monday{enDash}Friday. (#40, @eliotw1 & @ZevEisenberg)
  • Added -lineBreakMode support, so you can specify the line break mode of attributed strings. (#111, @tettoffensive)
  • Added -[BONText generatesEmptyString], so you can find out whether it’s empty in O(1) (constant) time.

Breaking Changes

  • Moved BONTextAlignmentConstraint to the new UIKit subspec, so you’ll need to include BonMot/UIKit in your Podfile if you want to use it. Carthage users should be unaffected by this change, since the project that is exposed to Carthage includes this subspec.
  • Renamed the BONChainable protocol to BONTextable to better express how it is used.
  • Removed previously deprecated -[BONText debugDescriptionIncludeImageAddresses:]. Use -[BONText debugStringIncludingImageAddresses:] instead.

Deprecations

  • Deprecated -textColor in favor of -color on both BONChain and BONText. -textColor will be removed in the next major version update. (#135)
  • Deprecated +[BONText joinTexts:withSeparator]. It is replaced by +[BONText joinTextables:withSeparator], which supports mixing and matching BONChains and BONTexts for both the array to be joined and the separator.

Minor Changes & Bug Fixes

  • Fixed support for case-sensitive file systems. (#118, @ejohansson)
  • Stabilized flaky continuous integration builds on Travis CI.
  • We now run BONSpecialGenerator.swift every time the example project is built, which makes it easier to add special characters to BonMot. (#89, @eliotw1)
  • Made more use of Objective-C lightweight generics in library and example project.
  • Improved tests and added new ones.
  • Added mechanism to fail the continuous integration build if static analysis fails.
  • De-emphasized BONText in the README. It is still the workhorse class of BonMot, but unless you need to query a property, BONChain should probably be your go-to for styling strings.

Don't miss a new BonMot release

NewReleases is sending notifications on new releases.