All Versions
42
Latest Version
Avg Release Cycle
84 days
Latest Release
-
Changelog History
Page 1
Changelog History
Page 1
-
v5.3.0 Changes
π₯ Breaking Change
- Sequence
- UIView
- Rename
shadowColor
,shadowOffset
,shadowOpacity
andshadowRadius
tolayerShadowColor
,layerShadowOffset
,layerShadowOpacity
andlayerShadowRadius
to avoid naming collisions with subclasses properties defined in other modules e.g. UIKit. #897 by LucianoPAlmeida - Rename
borderColor
,borderWidth
andcornerRadius
tolayerBorderColor
,layerBorderWidth
, andlayerCornerRadius
to avoid naming collisions with subclasses properties defined in other modules e.g. UIKit. #972 by Jayxiang
- Rename
β Added
- SCN3Vector
- Added
normalized
method, and basic division functions (SCNVector3 / scalar
, andSCNVector3 /= scalar
. #908 by thisIsTheFoxe
- Added
- Dictionary
- Added
pick(keys:)
to pick part of a dictionary with specified keys. #911 by MaratIbragimov
- Added
- UIScrollView
- β XCTest
- BinaryInteger
- Added
bytes
andinit?(bytes:)
to make it easier to work with bytes (as[UInt8]
). #987 by thisIsTheFoxe
- Added
- FloatingPoint
- Collection
- UIViewController:
- String:
- Added
fullNSRange
,range(from:)
,nsRange(from:)
andsubscript
for converting betweenRange<String.Index>
andNSRange
. #902 by guykogus - Overloaded Swift's 'contains' operator (
~=
) forString
to check regex matching. #858 by VatoKo regexEscaped
, which returns an escaped string for inclusion in a regex pattern- Added
matches(regex:options:)
and the~= regex
to check directly against NSRegularExpression. Also addedreplacingOccurrences(regex:template:options:searchRange:)
as a more convenient way to replace NSRegularExpressions. #901 by gurgeous
- Added
- DispatchQueue:
- RangeReplaceableCollection:
- Sequence:
- Added
contains(_:)
forHashable
elements for performance improvement. #912 by guykogus - Added
first(where:equals:)
to find the first element of the sequence with having property by given key path equals to given value. #836 by hamtiko - Added
last(where:equals:)
to find the last element of the sequence with having property by given key path equals to given value. #838 by hamtiko
- Added
- SKNode:
- CGSize:
- WKWebView:
- HKActivitySummary:
- Added
isStandGoalMet
,isExerciseTimeGoalMet
, andisEnergyBurnedGoalMet
. #875 by lhygilbert
- Added
- UIView:
- Added
masksToBounds
(IBInspectable) extension. #877 by hamtiko - Added
loadFromNib(withClass:)
, which loads a UIView of a particular type from a nib file. #885 by gurgeous - Added
findConstraint
for finding an existing constraint. #886 by gurgeous - Added
widthConstraint
,heightConstraint
,leadingConstraint
,trailingConstraint
,topConstraint
, andbottomConstraint
for finding specific constraints. #886 by gurgeous - Added
UIView.subviews(ofType:)
extension which returns all the subviews of a given type recursively in the view hierarchy rooted on the view it its called. #993 by ashercoelho - Added
UIStackView.swap(_ view1:, _ view2:)
extension which exchanges two views that are arranged in the stack. #989 by salahamassi
- Added
- UIImage
- Added
averageColor
, which calculates the average UIColor for an entire image. #884 by gurgeous - Added
withAlwaysOriginalTintColor(_:)
returns a new version of the image with a tint color that uses the .alwaysOriginal rendering mode. #886 by [jayxiang][https://github.com/jayxiang]
- Added
- StringProtocol
- Measurement
- Added
.degrees(_:)
,arcMinutes(_:)
,arcSeconds(_:)
,radians(_:)
,gradians(_:)
andrevolutions(_:)
to conveniently initialize measurement with corresponding unit. #936 by Shiva Huang
- Added
- UITextField
- Added
addToolbar(items:height:)
to add a toolbar to aUITextField
. #954 by Randhir Kumar
- Added
- URL
- Added the
(unsafeString: String)
initializer forURL
as a more conveniently to construct unsafeURL
s fromString
by jevonmao
- Added the
- MKMultiPoint
- Added
.coordinates
property, to return an array of coordinates for the providedMKMultiPoint
. #990 by @rizwankce.
- Added
- NSAttributedString
- Added
Array.joined(separator:)
to create a newNSAttributedString
by concatenating the elements of the sequence, adding the given separator between each element. #985 by Roman Podymov.
- Added
- UIButton
- Added
setAttributedTitleForAllStates
,attributedTitleForDisabled
,attributedTitleForHighlighted
,attributedTitleForNormal
andattributedTitleForSelected
for convenient work with attributed strings. #1001 by Roman Podymov.
- Added
- Digest
- Added
hexString
to get a hexadecimal representation for all digest typed inCryptoKit
(e.g.SHA216Digest
,SHA512Digest
,MD5Digest
, ...). #1026 by Marco Eidinger.
- Added
π Changed
- NSAttributedString:
- Color:
- Refactored
init(light:dark:)
to remove deployment target version restrictions. #844 by VincentSit. - Use
enum
to declare namespace instead of usingstruct
. Thus private initializer is no longer needed. #927 by Shiva Huang - Add
init?(argbHexString:)
to support the common ARGB format used in Android. #971 by yonat
- Refactored
- CAGradientLayer:
- UITextField:
- UIAlertController:
- Mark
show
method as unavailable foriOSAppExtension
targets. #918 by LucianoPAlmeida
- Mark
- UIRefreshControl:
- SKSpriteNode:
- Added
aspectFill(to:)
to size SKSpriteNode with respect to aspect ratio. #490 by erikdrobne.
- Added
π Deprecated
- Sequence:
- Marked
map(by:)
,compactMap(by:)
,filter(by:)
as deprecated in favor use of Key Path expressions as functions feature in Swift 5.3. #862 by Roman Podymov.
- Marked
β Removed
- UIDatePicker
- MKPolyline
- Removed
.coordinates
property, in favour of.coordinates
property fromMKMultiPoint
. SinceMKPolyline
extends fromMKMultiPoint
it should work fine. #990 by @rizwankce.
- Removed
π Fixed
- Collection
- CAGradientLayer:
- CAGradientLayer extensions inaccessible through internal level protection. #856 by Den Andreychuk.
- StringExtensions.swift:
- Fixed a bug: When the length of a string is 0, calling truncated method will crash. #866 by phil zhang
- Fixed
String.base64Decoded
making it a safe decode by ignore non-base64 characters. #961 by Jayxiang
- UITextField
- UIImage
- UIView
- ColorExtension:
- Fixed a bug:
Color.FlatUI
can be initialized. by Shiva Huang - Fixed
Color.init?(hexString: String, transparency: CGFloat = 1)
was not handling uppercase0X
in hex prefix #947 by Zero.D.Saber
- Fixed a bug:
- URLExtension
π Security
-
v5.2.0 Changes
April 05, 2020β Added
- CATransform3D:
identity
,isIdentity
,init(translationX:y:z:)
,init(scaleX:y:z:)
,init(rotationAngle:x:y:z:)
,translatedBy(x:y:z:)
,scaledBy(x:y:z:)
,rotated(by:x:y:z:)
,inverted()
,concatenating(_:)
,translateBy(x:y:z:)
,scaleBy(x:y:z:)
,rotate(by:x:y:z:)
,invert()
,concatenate(_:)
,isAffine
andaffineTransform()
. Also conforms toCodable
andEquatable
. #819 by guykogus
- CGAffineTransform:
- NotificationCenter:
- Optional:
- CoreLocation:
- Added
Array where Element: CLLocation extension
and addeddistance(unitLength:)
function. #799 by trevorphillips
- Added
- Decodable:
- Added
init?(data:decoder:)
to decodeDecodable
(Codable) type models. #797 by Mustafa GUNES.
- Added
- CLVisit:
- Created
CLVisit Extension
and addedlocation
property. #792 by trevorphillips
- Created
- EdgeInsets:
- Array:
- Added
sorted(like:keyPath:)
to sort an array like another array based on a key path. #772 by MaxHaertwig.
- Added
- MKMapView:
- Added
zoom(to:meter:edgePadding:animated:)
method to zoom multipleMKMapView
coordinates. #723 by Mustafa GUNES.
- Added
- Dictionary:
- RangeReplaceableCollection:
- Added
removeDuplicates(keyPath:)
for removing duplicate elements based on key path. #737 by Ilya Glushchuk. - Added
appendIfNonNil(_:)
andappendIfNonNil(contentsOf:)
methods that can append optional elements and sequences. #966 by jevonmao
- Added
- Color:
- Added
init(light:dark:)
to create an NSColor/UIColor with different variations for light and dark mode. Only available in iOS/tvOS 13.0, macOS 10.15. #722 by MaxHaertwig.
- Added
- String:
- NSRegularExpression:
- Added
enumerateMatches(in:options:range:using:)
,matches(in:options:range:)
,numberOfMatches(in:options:range:)
,firstMatch(in:options:range:)
,rangeOfFirstMatch(in:options:range:)
,stringByReplacingMatches(in:options:range:withTemplate:)
,replaceMatches(in:options:range:withTemplate:)
, which useString
andString.Range
in place ofNSString
andNSRange
to make the calls Swifter. #727 by guykogus.
- Added
- UIBarButtonItem:
- Added
flexibleSpace
andfixedSpace(width:)
extensions to UIBarButtonItem to simplify the creation of spacers. #728 by MaxHaertwig.
- Added
- UIImage:
- Added missing test for
compressedData(quality:)
. #786 by thisIsTheFoxe - Added
withBackgroundColor(_:)
to specify a background color for a partially transparent image. #721 by MaxHaertwig. - Added
init?(base64String:)
to create aUIImage
from a base-64String
. #741 by @thisIsTheFoxe - Added
pngBase64String()
,jpegBase64String(compressionQuality:)
which return a Base 64String
representation of theUIImage
s PNG or JPEG data. #747 by Moritz Sternemann. - Added
init?(url:scale:)
to initialize aUIImage
with a given url and scale factor. #753 by mmdock
- Added missing test for
- CAGradientLayer:
- Added
init(colors:locations:startPoint:endPoint:type:)
convenience initializer. #726 by JayMehta97.
- Added
- Sequence:
- Added
sum(for:)
to sum up anAdditiveArithmetic
property, referenced byKeyPath
, of all elements in a sequence. #736 by Moritz Sternemann. - Added
sorted(by:and:)
andsorted(by:and:and:)
to obtain a sorted sequence based on multiple key paths. #796 by MaxHaertwig. - Added
map(by:)
to map the sequence elements by a given key path. #763 by Roman Podymov. - Added
compactMap(by:)
to map the sequence elements by a given key path to the non-nil elements array. #766 by Roman Podymov. - Added
filter(by:)
to filter the sequence elements by a given boolean key path. #771 by Roman Podymov.
- Added
- MutableCollection:
- Added
assignToAll(value:keyPath:)
to assign given value to fieldkeyPath
of every element in the collection. #759 by cyber-gh. - Added
sort(by:and:)
andsort(by:and:and:)
to sort a sequence based on multiple key paths. #796 by MaxHaertwig.
- Added
- KeyedDecodingContainer:
- Locale:
- URLRequest:
- SKProduct:
- Added
localizedPrice
to get localized price of product. #781 by strawb3rryx7.
- Added
- CGRect
- Added property
center
. #814 by qchenqizhi. - Added initializer
init(center:size:)
to createCGRect
with center and size. #814 by qchenqizhi. - Added
resizing(to:anchor:)
to createCGRect
by resizing with anchor. #814 by qchenqizhi.
- Added property
π Changed
- Collection:
- UIImage:
- UIImage:
- Sequence:
- NSAttributedString:
- Update
applying(attributes: [NSAttributedString.Key : Any], toRangesMatching pattern: String)
to respondapplying(attributes: [NSAttributedString.Key : Any], toRangesMatching pattern: String, options: NSRegularExpression.Options = [])
signature to support regular expression options. #791 by DimaZava
- Update
- UIButton:
- Refactored
centerTextAndImage(spacing:)
: now the image position can be above the text, by setting a new parameterimageAboveText
totrue
. #807 by qchenqizhi.
- Refactored
- String:
π Fixed
- π Fixed build error occurring when building AppKit extensions for macCatalyst. #762 by MaxHaertwig.
- π Fixed
String.base64Decoded
making it a safe decode by including padding on the string. #801 by LucianoPAlmeida. - π Fixed
UIImage.cropped(to:)
making it work correctly with scaled image. #811 by qchenqizhi.
- CATransform3D:
-
v5.1.0 Changes
September 23, 2019β 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:
-
v5.0.0 Changes
March 31, 2019β Added
- π Swift 5.0 Support
- Updated the project to Xcode 10.2
- Removed unnecessary
public
statements.
- π§ Linux Support
- Support for Linux running Swift 5.0 using Swift Package Manager.
- UIApplication:
- Added
inferredEnvironment
to get current inferred app environment. by omaralbeik - Added
displayName
to get application name. by omaralbeik - Added
buildNumber
to get application build number. by omaralbeik - Added
version
to get application version number. by omaralbeik
- Added
- Optional:
- Added
nonEmpty
to get the collection only if it is not nill and not empty. by omaralbeik
- Added
- FileManager:
- UILabel:
- Added
init(text:style)
to create aUILabel
with a text and font style. #607 by marcocapano
- Added
- UIViewController
- Added
presentPopover(_:sourcePoint:size:delegate:animated:completion:)
method to quickly present aUIViewController
as a popover. #593 by marcocapano
- Added
- Sequence:
- Added
duplicates()
for getting the duplicated elements in a sequence. #605 by dylancfe15
- Added
- Date:
- β Added
tomorrow
computed property to get tomorrow's date avoiding callingadding(_:value:)
function. (Completes PR #578) #587 by AlexeiGitH - Dictionary:
- Added
Dictionary[path:]
subscript for deep fetching/setting nested values. #574 by @calebkleveter
- Added
- UIColor:
- Added
whatsApp
color constant to social struct. #581 by staffler-xyz
- Added
- DispatchQueue:
- BidirectionalCollection:
- BinaryFloatingPointExtensions:
- UIActivity:
- Added
ActivityType
constants for iCloud Drive, WhatsApp, LinkedIn and XING. #580 by staffler-xyz
- Added
- MKMapView
- Added 'register(annotationViewWithClass:)
,
dequeueReusableAnnotationView(withClass:)and
dequeueReusableAnnotationView(withClass:annotation)` methods. #629 by staffler-xyz
- Added 'register(annotationViewWithClass:)
π Changed
- Character:
- Added more cases to
isEmoji
. by omaralbeik
- Added more cases to
- String:
- Added more cases to
isEmoji
. by omaralbeik - Made
camelize
,latinize
,reverse
,slice
,trim
,truncate
,urlDecode
,urlEncode
,padStart
, andpadEnd
return adiscardableResult
self. by omaralbeik
- Added more cases to
- Examples:
- StringProtocol:
- Removing Index constraint on
commonSuffix
extension and improving performance and tests. #606 by LucianoPAlmeida.
- Removing Index constraint on
- RangeReplaceableCollection:
Array
extensionskeep(while: )
,take(while: )
andskip(while:)
are nowRangeReplaceableCollection
extensions. #634 by LucianoPAlmeida.
- Date:
- Fixed
yesterday
computed property to be calculated using Calendar.date(byAdding:to:) instead of date.addingTimeInterval(-86400) #641 by AlexeiGitH.
- Fixed
π Fixed
- UIImageView:
- Fixed
download
function to useunowned self
. by omaralbeik
- Fixed
- Installation:
- UIImage:
- Fixed
cropped(to:)
size checking. #575 by ilyahal - Fixed
tint(_ color:, blendMode:)
upside-down image. #639 by LucianoPAlmeida.
- Fixed
- NSAttributedString:
- Fixed
attributes
property crash when the string is empty. #617 by LucianoPAlmeida.
- Fixed
- Date:
- Fixed
yesterday
computed property to be calculated using Calendar.date(byAdding:to:) instead of date.addingTimeInterval(-86400) #641 by AlexeiGitH. - Fixed
tomorrow
computed property to be calculated using Calendar.date(byAdding:to:) instead of date.addingTimeInterval(86400) #642 by AlexeiGitH.
- Fixed
β Removed
- SwifterSwift:
- Breaking Change Removed
SwifterSwift
by omaralbeik.
- Breaking Change Removed
- Collection:
- Removed
firstIndex(where: )
,firstIndex(of:)
,lastIndex(where: )
,lastIndex(of:)
which are no longer needed. #637 by marcocapano
- Removed
- Date:
CI
- β‘οΈ Updated Travis to use the new
xcode10.2
osx_image. - β Added Fastlane to automate the releasing process for maintainers.
- π Swift 5.0 Support
-
v4.6.0 Changes
September 28, 2018β Added
- Date
- Added
yesterday
computed property to quickly get yesterday's date to avoid callingadding(_:value:)
function. #578 by AlexeiGitH
- Added
- UIView
- Added
ancestorView(where:)
andancestorView(withClass:)
to search for a view in the superviews. #560 by overovermind ### π Fixed
- Added
- π Fixed Cocoapods installation setting the correct Swift version
- Date
-
v4.5.0 Changes
September 21, 2018β Added
- CGVector
- Added
angle
computed property to get the angle of the vector (in radians). #527 by moyerr - Added
magnitude
computed property to get the magnitude (or length) of the vector. #527 by moyerr - Added scalar multiplication of CGFloat and CGVector via standard multiplication operator (*). #527 by moyerr
- Added negation of vectors via prefix (-) operator. #527 by moyerr
- Added
init(angle:magnitude:)
to create vectors based on their angle and magnitude. #527 by moyerr -UIRefreshControl: beginRefresh(in tableView:, animated:, sendAction:)
UIRefreshControl extension to begin refresh programatically. #525 by ratulSharker
- Added
- Dictionary:
- Added
removeValueForRandomKey()
to remove a value for a random key from a dictionary. #497 by MaxHaertwig. - Added
mapKeysAndValues(_:)
to map aDictionary
into aDictionary
with different (or same)Key
andValue
types. #546 by guykogus - Added
compactMapKeysAndValues(_:)
to map aDictionary
into aDictionary
, excludingnil
results, with different (or same)Key
andValue
types. #546 by guykogus - Added
keys(forValue:)
which returns an array of all keys that have the given value in dictionary. #561 by mauliksharma.
- Added
- RangeReplaceableCollection:
- Added
removeRandomElement()
to remove a random element from a collection. #497 by MaxHaertwig.
- Added
- UIView
- Added
addGestureRecognizers(_:)
which accepts an array ofUIGestureRecognizer
to add multiple gesture recognizers to a view with one call. #523 by moyerr - Added
removeGestureRecognizers(_:)
which accepts an array ofUIGestureRecognizer
to remove multiple gesture recognizers from a view with one call. #523 by moyerr
- Added
- UIViewController
- Added
addChildViewController(_:toContainerView)
to easily add child view controllers. Accepts aUIViewController
and aUIView
to add the child's view to. - Added
removeViewAndControllerFromParentViewController()
to remove aUIViewController
from its parent.
- Added
- NSView
- Added
backgroundColor
which allows to change backgroundColor of NSView #702 by RomanPodymov
- Added
- UIEdgeInsets
- Added
insetBy(top:)
,insetBy(left:)
,insetBy(bottom:)
,insetBy(right:)
,insetBy(horizontal:)
andinsetBy(vertical:)
to creates anUIEdgeInsets
based on current value and adjusted by given offset. #532 by VincentSit. - Added operators
+
and+=
to add two insets together in order to extend them. #557 by guykogus
- Added
- UILayoutPriority
- Added
init(floatLiteral value: Float)
initializer to initialize priority with float literal. #549 by diamantidis. - Added
init(integerLiteral value: Int)
initializer to initialize priority with integer literal. #549 by diamantidis.
- Added
- RangeReplaceableCollection
init(expression:count:)
to create a collection of a given count initialized with an expression.#537 by LucianoPAlmeida.
- Optional:
- Data:
- URL
- CGSize
- Added operator
+
to return the addition of two CGSize. - Added operator
+=
to add a CGSize to another. - Added operator
-
to return the subtraction of two CGSize. - Added operator
-=
to subtract a CGSize from another. - Added operator
CGSize * CGSize
to return the multiplication of two CGSize. - Added operator
CGSize * CGFloat
andCGFloat * CGSize
to return the multiplication of a CGSize and a CGFloat value. - Added operator
CGSize *= CGSize
to multiply a CGSize with another one. - Added operator
CGSize *= CGFloat
to multiply a CGSize with a CGFloat value.
- Added operator
- UIImage:
π Changed
- RangeReplaceableCollection:
rotate(by:)
androtated(by:)
array extensions now are more genericRangeReplaceableCollection
extensions. #512 by LucianoPAlmeida.removeFirst(where:)
array extension now is more genericRangeReplaceableCollection
extensions. #516 by LucianoPAlmeida.
- RandomAccessCollection:
indices(of:)
array extension now is more genericRandomAccessCollection
extensions. #516 by LucianoPAlmeida.
- UIView:
π Fixed
- UIImage:
- π Fixed
scaled(toWidth:, with orientation:)
andscaled(toHeight:, with orientation:)
were using image's scale as the scale factor. #515 by VincentSit. - String:
- Used RFC 5322 in
isValidEmail
, an email address regex that 99.99% works. #517 by Omar Albeik - Fixed
unicodeArray()
not returning the correct unicode value due to Swift 4.2 new hashing system. #544 by Omar Albeik
- Used RFC 5322 in
π Deprecated
- String:
isEmail
property has been renamed toisValidEmail
.
β Removed
π Security
- CGVector
-
v4.4.0 Changes
June 29, 2018β Added
- SKNode:
- Added
descendants
method to get an array of all descendants of an SKNode. #490 by oliviabrown9.
- Added
- Comparable:
- UIScrollView:
- UIGestureRecognizer:
- Character:
- Added
randomAlphanumeric()
method to generate a random alphanumeric Character. #462 by oliviabrown9
- Added
- String:
- Added
firstCharacterUppercased()
method to return a string with only the first character uppercased. #505 by happiehappie
- Added
- UITextView:
- Added
wrapToContent()
method which will remove insets, offsets, paddings which lies within UITextView'sbounds
andcontenSize
. #458 by ratulSharker
- Added
- URL
- Added
deletingAllPathComponents()
anddeleteAllPathComponents()
to delete all path components from a URL. #441 by setoelkahfi. - Added
queryValue(for:)
to get the value of a query key from a URL. #467 by jdisho.
- Added
- UITableView:
- Added
isValidIndexPath(_:)
method to check whether given IndexPath is valid within UITableView. #441 by setoelkahfi. - Added
safeScrollToRow(at:at:animated:)
method to safely scroll UITableView to the given IndexPath. #445 by setoelkahfi. - Fixed
lastSection
, andindexPathForLastRow
andindexPathForLastRow(inSection: 0)
methods to get last section, get the lastIndexPath for section 0 if exists and get the lastIndexPath for a given section respectively . #694 by mohshin-shah.
- Added
- Optional:
- Added
isNilOrEmpty
property to check whether an optional is nil or empty collection.
- Added
- UIWindow:
- Added
switchRootViewController
method to switch root view controller with animation. #494 by omaralbeik.
- Added
- Sequence
- Added
containsDuplicates()
to check whether a sequence contains duplicates. #496 by MaxHaertwig. - Added
single(where:)
to get the only element of a sequence that matches a given condition. #483 by andlang.
- Added
- UIStackView:
- Added
addArrangedSubviews(_ views: )
to add an array of views to the end of the arrangedSubviews array. #501 by omaralbeik. - Added
removeArrangedSubviews
to remove all views in stackβs array of arranged subviews. #501 by omaralbeik.
- Added
- UIEdgeInsets
- Added
horizontal
andvertical
properties. Alsoinit(inset:)
andinit(horizontal: vertical:)
initializers for convenience. #500 by LucianoPAlmeida.
- Added
π Changed
- UITableView:
- UICollectionView:
- UIView:
- Breaking Change
firstResponder
UIView extension is now a function and supports recursive find in the view hierarchy. #447 by LucianoPAlmeida.
- Breaking Change
- UIImage:
scaled(toWidth:, opaque:, with orientation:)
andscaled(toHeight:, opaque:, with orientation:)
now have an optional parameter for opaqueness. #446 by MaxHaertwig.
- Array/Collection/Sequence
- The conformance of
sum()
,last(where:)
,reject(where:)
,count(where:)
,forEachReversed()
,forEach(where:, body:)
,accumulate(initial:, next:)
,filtered(_:, map:)
andcontains(_:)
has been changed from Array to Sequence #470 by MaxHaertwig. - The conformance of
average()
,firstIndex(where:)
,lastIndex(where:)
,indices(where:)
,forEach(slice:, body:)
,group(by:)
,firstIndex(of:)
andlastIndex(of:)
has been changed from Array to Collection #470 by MaxHaertwig.
- The conformance of
- Dictionary
- The
removeAll(keys:)
changed its paramenter keys to a genericSequence
instead of anArray
. #482 by LucianoPAlmeida.
- The
π Deprecated
- Array
groupByKey(keyForValue:)
. #454 by @calebkleveter
π >### Removed
π Fixed
- UIImage:
scaled(toWidth:, with orientation:)
andscaled(toHeight:, with orientation:)
were ignoring an image's scale. #446 by MaxHaertwig.init(color:size:)
fixed to ensure thatUIGraphicsEndImageContext
is always called afterUIGraphicsBeginImageContextWithOptions(_:_:_)
#507 by guykogus
- SKNode:
-
v4.3.0 Changes
April 10, 2018β Added
- Swift 4.1 / Xcode 9.3
- Added Swift 4.1 support.
- π§ Linux Support:
- Updated all swift files to use Swift's 4.1
# if canImport(module)
statement, which brings the project one step closer to first-class Linux support.
- Updated all swift files to use Swift's 4.1
- Sequence
- SignedInteger
- SignedNumeric
- String
- π SwiftLint:
- reduced the number of disabled rules in .swiftlint.yml, please add
disable
andenable
statements from now on when needed in code. - added SwiftLint to test targets to insure code style consistency across the project.
- reduced the number of disabled rules in .swiftlint.yml, please add
π Changed
- SignedNumeric:
asLocaleCurrency
now returns an optional string.
- Array:
rotate
method now returns adiscardableResult
.shuffle
method now returns adiscardableResult
.sort<T: Comparable>(by:, ascending:)
method now returns adiscardableResult
.keep
method now returns adiscardableResult
.
π Deprecated
- UIStoryboard:
mainStoryboard
property has been renamed tomain
.
- Array:
- deprecated
pop
method in favor of SwiftβspopLast
. - deprecated
push
method in favor of Swiftβsappend
. - deprecated
swap
method in favor of SwiftβsswapAt
. - deprecated
item(at index: Int)
method in favor ofsubscript(safe:)
. duplicatesRemoved
method has been renamed towithoutDuplicates
.
- deprecated
- Bool:
- deprecated
toggled
property, use!self
instead. - deprecated
toggle
method, useself = !self
instead.
- deprecated
π Fixed
- String
- Fixed UIView extension
addShadow
was not showing the shadow on view bug. #420 by LucianoPAlmeida.
- Fixed UIView extension
- Swift 4.1 / Xcode 9.3
-
v4.2.0 Changes
March 11, 2018β Added
- MKPolyline
- Optional
- Added
.unwrapped(or:)
method, to get the value wrapped by an optional or throw a custom error. #413 by @calebkleveter.
- Added
- UIButton
- Array
- Int
- added
roundToNearest(n:)
to round an integer to the closest multiple of a given n. #381 by MaxHaertwig.
- added
- FileManager
- added
jsonFromFile(atPath path:, readingOptions:)
to open a JSON file and serialize its content to a [String, Any]? instance with a provided path. #390 by jason-ingenuity. - added
jsonFromFile(withFilename filename:, at bundleClass:, readingOptions:)
to open a JSON file and serialize its content to a [String, Any]? instance given a filename. #390 by jason-ingenuity.
- added
- Int
- StringProtocol
- added
commonSuffix(with:, options:)
to get the longest common suffix of the receiver and a given string. #379 by MaxHaertwig.
- added
- UICollectionView
- added
register(nibWithCellClass:, at bundleClass:)
method to be able to register a cell with custom nib just by its class name. #386 by jason-ingenuity.
- added
- UIFont
- added
bold
anditalic
to UIFont. #382 by MaxHaertwig.
- added
- UIImage
- added
withRoundedCorners(radius:)
to round the corners of an image. The parameter radius is optional, the resulting image will be round if it is unspecified. #380 by MaxHaertwig.
- added
- UITableView
- added
register(nibWithCellClass:, at bundleClass:)
method to be able to register a cell with custom nib just by its class name. #386 by jason-ingenuity.
- added
- URL
- added
queryParmeters
property to get the query parameters from a URL as a dictionary. #370 by nathanbacon. - added
thumbnail(fromTime:)
to generate a thumbnail image from a given url. 410 by BennX.
- added
- 0οΈβ£ UserDefaults
- added
object(type: with key: usingDecoder decoder:)
method to be able to retrieve Codable objects from UserDefaults. #388 by jason-ingenuity. - added
set(codable: forKey key: usingEncoder encoder:)
method to be able to store Codable objects from UserDefaults. #388 by jason-ingenuity.
- added
- String
- New UIStackView
π Fixed
- String
- Collection
- Fixed
randomItem
crash with empty array. #405 by LucianoPAlmeida.
- Fixed
-
v4.1.1 Changes
January 06, 2018β 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