SwifterSwift v5.1.0 Release Notes
Release Date: 2019-09-23 // over 4 years ago-
โ Added
Array:
- Added
withoutDuplicates(keyPath:)
for filtering duplicate elements based on key path. #704 by RomanPodymov.
- Added
Sequence:
- Added
withoutDuplicates(transform:)
for remove duplicate elements based on condition in a sequence. #666 by saucym - Added
sorted(by:with:)
to return sorted array from aSequence
with by a given keyPath using a compare function. #712 by LucianoPAlmeida
- Added
MutableCollection:
- Added
sort(by:with:)
to sort aCollection
with by a given keyPath using a compare function. #712 by LucianoPAlmeida
- Added
String
CGSize:
- Added
aspectRatio
,maxDimension
, andminDimension
properties. #662 by MaxHaertwig.
- Added
SCNBox:
- Added
init(width:height:length:)
,init(sideLength:chamferRadius:)
,init(width:height:length:chamferRadius:material:)
,init(sideLength:chamferRadius:material:)
,init(width:height:length:chamferRadius:color:)
, andinit(sideLength:chamferRadius:color:)
convenience initializers. #660 by MaxHaertwig.
- Added
SCNCapsule:
- Added
init(capDiameter:height)
,init(capRadius:height:material:)
,init(capDiameter:height:material:)
,init(capRadius:height:color:)
, andinit(capDiameter:height:color:)
convenience initializers. #660 by MaxHaertwig.
- Added
SCNCone:
- Added
init(topDiameter:bottomDiameter:height)
,init(topRadius:bottomRadius:height:material:)
,init(topDiameter:bottomDiameter:height:material:)
,init(topRadius:bottomRadius:height:color:)
, andinit(topDiameter:bottomDiameter:height:color:)
convenience initializers. #660 by MaxHaertwig.
- Added
SCNCylinder:
- Added
init(diameter:height)
,init(radius:height:material:)
,init(diameter:height:material:)
,init(radius:height:color:)
, andinit(diameter:height:color:)
convenience initializers. #660 by MaxHaertwig
- Added
SCNGeometry:
- Added
boundingSize
property to get the size of the geometry's bounding box. #660 by MaxHaertwig.
- Added
SCNMaterial:
- Added
init(color:)
convenience initializer. #660 by MaxHaertwig.
- Added
SCNPlane:
- Added
init(width:)
,init(width:height:material:)
,init(width:material:)
,init(width:height:color:)
, andinit(width:color:)
convenience initializers. #660 by MaxHaertwig.
- Added
SCNShape:
- Added
init(path:extrusionDepth:material:)
andinit(path:extrusionDepth:color:)
convenience initializers. #660 by MaxHaertwig.
- Added
SCNSphere:
- Added
init(diameter:)
,init(radius:material:)
,init(radius:color:)
,init(diameter:material:)
, andinit(diameter:color:)
convenience initializers. #660 by MaxHaertwig.
- Added
SCNVector3:
- Added
absolute
property to calculate the vector's components as absolute values. #660 by MaxHaertwig. - Added
length
property to calculate the vector's length. #660 by MaxHaertwig.
- Added
UICollectionView:
Sequence:
UIBezierPath:
- Added
init(from:to:)
,init(points:)
,init(polygonWithPoints:)
,init(ovalOf:centered:)
andinit(rectOf:centered:)
convenience initializers. #659 by MaxHaertwig.
- Added
๐ Changed
UIApplication:
- Refactored
queryValue(for:)
extension for URL. #668 by LucianoPAlmeida.
- Refactored
Sequence:
๐ Deprecated
- Array:
- Deprecated
sorted(by:, ascending)
andsort(by:ascending)
in favor ofsorted(by:with:)
andsort(by:with:)
#712 by LucianoPAlmeida
- Deprecated
โ Removed
Character:
- Removed
isNumber
,isLetter
,isLowercased
,isUppercased
andisWhiteSpace
because the same properties are defined in the Swift standard library. #689 by RomanPodymov.
- Removed
Array:
๐ Fixed
UIApplication:
- Resolved an issue where
version
would return the wrong Info.plist value. - Resolved an issue where
version
anddisplayName
would return nil if localized.
- Resolved an issue where
UIImage:
- The size of rect can equal to the size of UIImage when using
cropped(to:)
to crop UIImage. #679 by dirtmelon. scaled(toHeight:opaque:)
andscaled(toWidth:opaque:)
will now keep the original scale of UIImage. #703 by ShannonChou
- The size of rect can equal to the size of UIImage when using
UITableView: