SwifterSwift v4.1.1 Release Notes
Release Date: 2018-01-06 // about 6 years ago-
โ Added
- NSPredicate
- Added operator
!
to return a new predicate formed by NOT-ing a given predicate. - Added operator
+
to return a new predicate formed by AND-ing two given predicates. - Added operator
|
to return a new predicate formed by OR-ing a two given predicates. - Added operator
-
to return a new predicate formed by removing the argument from the second predicate. #345 by yycking.
- Added operator
- NSAttributedString
- Added
attributes
property to get the attributes that apply to a simple NSAttributedString. #333 by nathanbacon. - Added
applying(attributes: , toRangesMatching: )
function to return an attributed string with attributes applied to substrings matching the passed regex pattern by nathanbacon. - Added
applying(attributes: , toOccurrencesOf: )
function to return an attributed string with attributes applied to substrings matching the passed string by nathanbacon.
- Added
- Array
- Added
sort(by: KeyPath)
andsorted(by: KeyPath)
to sort arrays based on Swift 4 keyPath. #343 by LucianoPAlmeida.
- Added
- String
- Added
loremIpsum(ofLength: )
static function to return a lorem ipsum string. #318 by omaralbeik.
- Added
- UIDatePicker
- Added
textColor
to get and set the text color of a UIDatePicker. #328 by omaralbeik.
- Added
- NSImage
- Added
write(to url: URL, fileType type: _, compressionFactor: _)
to write NSImage to url. #320 by omaralbeik.
- Added
- Date
- Added
random(from: Date, upTo: Date) -> Date
method that return radom date in in the specified range #336 by akuzminskyi. - Added
string(withFormat format: String)
method to get a string from a date with the given format. - Added
init?(integerLiteral value: Int)
initializer to create date object from Int literal. #342 by n0an.
- Added
UIViewController
Array
- Breaking Change
indexes(of:)
has been renamed toindices(of:)
. #355 by Najdan shuffle
andshuffled
are no more constrained to Equatable. #327 by LucianoPAlmeida.
- Breaking Change
๐ Fixed
- Int
- UINavigationBar
- Fixed a bug where makeTransparent was keeping the background color. #344 by omaralbeik.
- Continuous Integration
- Fixed swiftlint warning in
NSImageExtensions
.
- Fixed swiftlint warning in
- NSPredicate