SwifterSwift v4.0.1 Release Notes

Release Date: 2017-10-08 // over 6 years ago
  • API Breaking

    N/A

    ✨ Enhancements

    • Color
      • Refactored duplicated code from UIColorExtensions and NSColorExtensions into ColorExtensions. thanks to SD10.
      • Refactored duplicated tests from UIColorExtensionsTests and NSColorExtensionsTests into ColorExtensionsTests. #260 by LeLuckyVint.
      • Add cgFloatComponents to get RGB components for a Color represented as CGFloat numbers (between 0 and 1)
      • blend now support NSColor as well.
      • Corrected some typos in README. #263 by nick3399.
    • New String extensions
      • Add localized(comment:) to returns a localized string, with an optional comment for translators. #269 by MaxHaertwig.
    • New NSPredicate extensions
      • Add not to returns a new predicate formed by NOT-ing the predicate.
      • Add and(_ predicate: NSPredicate) to returns a new predicate formed by AND-ing the argument to the predicate.
      • Add or(_ predicate: NSPredicate) to returns a new predicate formed by OR-ing the argument to the predicate. #273 by MaxHaertwig.
    • New UILabel extensions
      • Add convenience init(text: String?) to initialize a UILabel with text. #271 by MaxHaertwig.
    • New Bool extensions
    • Continuous Integration
      • Add macOS tests to travis-ci.
      • Add calls to swiftlint and pod lib lint in Travis #264 by calebkleveter.
    • New SignedNumeric extensions tests ### 🛠 Bugfixes
    • Color
      • Fixed a bug in rgbComponents, shortHexString, and shortHexOrHexString where an exception was raised when color is white or black.
      • Corrected a typo in rgbComponenets -> rgbComponents