All Versions
42
Latest Version
Avg Release Cycle
84 days
Latest Release
-

Changelog History
Page 1

  • v5.3.0 Changes

    πŸ’₯ Breaking Change

    • Sequence
      • Remove last(where:) and move last(where:equals:) to BidirectionalCollection, since it only makes semantic sense for ordered sequences. #912 by guykogus
    • UIView
      • Rename shadowColor, shadowOffset, shadowOpacity and shadowRadius to layerShadowColor, layerShadowOffset, layerShadowOpacity and layerShadowRadius to avoid naming collisions with subclasses properties defined in other modules e.g. UIKit. #897 by LucianoPAlmeida
      • Rename borderColor, borderWidth and cornerRadius to layerBorderColor, layerBorderWidth, and layerCornerRadius to avoid naming collisions with subclasses properties defined in other modules e.g. UIKit. #972 by Jayxiang

    βž• Added

    • SCN3Vector
      • Added normalized method, and basic division functions (SCNVector3 / scalar, and SCNVector3 /= scalar. #908 by thisIsTheFoxe
    • Dictionary
      • Added pick(keys:) to pick part of a dictionary with specified keys. #911 by MaratIbragimov
    • UIScrollView
      • Added visibleRect, scrollToTop(animated:), scrollToLeft(animated:), scrollToBottom(animated:), scrollToRight(animated:), scrollUp(animated:), scrollLeft(animated:), scrollDown(animated:), scrollRight(animated:). #888 by guykogus
    • βœ… XCTest
      • Added XCTAssertEqual(_:_:accuracy:_:file:line:) for checking if Color objects are equal within a given level of accuracy. #889 by guykogus
    • FloatingPoint
      • Moved the square root operator √ from Double and Float to make it generic. #880 by guykogus
    • Collection
      • Added fullRange to get the entire range of indices in a collection. #902 by guykogus
      • Moved indices(of:) from RandomAccessCollection to find the indices of an element. #863 by guykogus
    • UIViewController:
      • Added instantiate(from:bundle:identifier:) function to UIViewController to make it easier to instantiate it from storyboard. #860 by VatoKo
    • String:
      • Added fullNSRange, range(from:), nsRange(from:) and subscript for converting between Range<String.Index> and NSRange. #902 by guykogus
      • Overloaded Swift's 'contains' operator (~=) for String 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 added replacingOccurrences(regex:template:options:searchRange:) as a more convenient way to replace NSRegularExpressions. #901 by gurgeous
    • DispatchQueue:
      • Added asyncAfter(delay:qos:flags:execute:) method to use it more conveniently without typing unnecessary .now() + delay. #859 by VatoKo
      • Re-added debounce(delay:action:) for only executing a closure once using a throttle delay. #869 by guykogus
    • RangeReplaceableCollection:
      • subscript(offset:) and subscript(range:) to access and replace elements by the index offsets. #826 by guykogus
    • Sequence:
      • Added contains(_:) for Hashable 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
    • SKNode:
      • center, topLeft, topRight, bottomLeft, bottomRight to get anchor position or set position using anchor. #835 by rypyak
    • CGSize:
      • Added new +, +=, - and -= operator extensions for tuple (width: CGFloat, height: CGFloat). #841 by hamtiko
    • WKWebView:
      • Added loadURL(_:) and loadURLString(_:) extensions for WkWebView. #851 by hamtiko
    • HKActivitySummary:
      • Added isStandGoalMet, isExerciseTimeGoalMet, and isEnergyBurnedGoalMet. #875 by lhygilbert
    • UIView:
      • Added masksToBounds (IBInspectable) extension. #877 by hamtiko
    • UIImage
      • Added averageColor, which calculates the average UIColor for an entire image. #884 by gurgeous
      • 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, and bottomConstraint for finding specific constraints. #886 by [gurgeous]
    • StringProtocol
      • Added replacingOccurrences(ofPattern:withTemplate:options:searchRange:) as a more convenient way to replace patterns. #901 by gurgeous
    • Measurement
      • Added .degrees(_:), arcMinutes(_:), arcSeconds(_:), radians(_:), gradians(_:) and revolutions(_:) to conveniently initialize measurement with corresponding unit. #936 by Shiva Huang
    • UITextField
      • Added addToolbar(items:height:) to add a toolbar to a UITextField. #954 by Randhir Kumar
    • URL
      • Added the (unsafeString: String) initializer for URL as a more conveniently to construct unsafe URLs from String by jevonmao ### πŸ”„ Changed
    • NSAttributedString:
      • bolded maintains font size and works on all platforms except Linux. italicized maintains font size and works on all platforms except Linux and macOS. #900 by guykogus
      • applying(attributes:) changed access modifier from fileprivate to public. #832 by cHaLkdusT
    • Color:
      • Refactored init(light:dark:) to remove deployment target version restrictions. #844 by VincentSit.
      • Use enum to declare namespace instead of using struct. 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
    • CAGradientLayer:
      • In init(colors:locations:startPoint:endPoint:type:) added default values to startPoint and endPoint. #864 by guykogus
    • UITextField:
      • Added addPaddingRight,addPaddingRightIconextension,#878 by Jayxiang
    • UIAlertController:
    • UIRefreshControl:
      • Add beginRefreshing(animated:sendAction:) that works inside any UIScrollView and not only UITableView. #949 by yonat
    • SKSpriteNode:
      • Added aspectFill(to:) to size SKSpriteNode with respect to aspect ratio. #490 by erikdrobne.

    πŸ—„ 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.

    βœ‚ Removed

    • UIDatePicker
      • Disabled textColor when compiling for target macCatalyst as it will crash. #864 by guykogus

    πŸ›  Fixed

    • Collection
      • indices(where:), forEach(slice:body:) can be used on a collection with any index type. average() can be used on any integer element type. #863 by guykogus
    • 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
      • Fixed a bug:UITextField addPaddingLeftIcon doesn't work on iOS 13#876 by Jayxiang
    • UIImage
      • Fixed a bug:UIImage rotated(by:) lose origin scale, result in image blurred#904 by yanpanpan
    • ColorExtension:
      • Fixed a bug: Color.FlatUI can be initialized. by Shiva Huang
      • Fixed Color.init?(hexString: String, transparency: CGFloat = 1) was not handling uppercase 0X in hex prefix #947 by Zero.D.Saber

    πŸ”’ 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 and affineTransform(). Also conforms to Codable and Equatable. #819 by guykogus
    • CGAffineTransform:
    • NotificationCenter:
      • observeOnce(forName:object:queue:using:) for observing a single posting of a notification. #812 by guykogus
    • Optional:
      • Conform to Equatable when Wrapped is RawRepresentable and its RawValue is Equatable. #804 by guykogus
    • CoreLocation:
      • Added Array where Element: CLLocation extension and added distance(unitLength:) function. #799 by trevorphillips
    • Decodable:
      • Added init?(data:decoder:) to decode Decodable (Codable) type models. #797 by Mustafa GUNES.
    • CLVisit:
    • EdgeInsets:
      • Unified UIEdgeInsets and NSEdgeInsets into a single typealias, EdgeInsets, similar to what we do with UIColor and NSColor. For the tests to function it was required to add the static zero property to NSEdgeInsets and to make it conform to Equatable. #785 by guykogus
    • Array:
      • Added sorted(like:keyPath:) to sort an array like another array based on a key path. #772 by MaxHaertwig.
    • MKMapView:
      • Added zoom(to:meter:edgePadding:animated:) method to zoom multiple MKMapView coordinates. #723 by Mustafa GUNES.
    • Dictionary:
      • Added init(grouping:by:) to initialize a dictionary by grouping sequence from a hashable KeyPath. #751 by mmdock
    • RangeReplaceableCollection:
      • Added removeDuplicates(keyPath:) for removing duplicate elements based on key path. #737 by Ilya Glushchuk.
      • Added appendIfNonNil(_:) and appendIfNonNil(contentsOf:) methods that can append optional elements and sequences. #966 by jevonmao
    • 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.
    • String:
      • Added withPrefix(_:), which provides a method to add a prefix to a string. If the string already has that prefix, it simply returns the original string. #720 by Zach Frew.
    • 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 use String and String.Range in place of NSString and NSRange to make the calls Swifter. #727 by guykogus.
    • UIBarButtonItem:
      • Added flexibleSpace and fixedSpace(width:) extensions to UIBarButtonItem to simplify the creation of spacers. #728 by MaxHaertwig.
    • 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 a UIImage from a base-64 String. #741 by @thisIsTheFoxe
      • Added pngBase64String(), jpegBase64String(compressionQuality:) which return a Base 64 String representation of the UIImages PNG or JPEG data. #747 by Moritz Sternemann.
      • Added init?(url:scale:) to initialize a UIImage with a given url and scale factor. #753 by mmdock
    • CAGradientLayer:
      • Added init(colors:locations:startPoint:endPoint:type:) convenience initializer. #726 by JayMehta97.
    • Sequence:
      • Added sum(for:) to sum up an AdditiveArithmetic property, referenced by KeyPath, of all elements in a sequence. #736 by Moritz Sternemann.
      • Added sorted(by:and:) and sorted(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.
    • MutableCollection:
      • Added assignToAll(value:keyPath:) to assign given value to field keyPath of every element in the collection. #759 by cyber-gh.
      • Added sort(by:and:) and sort(by:and:and:) to sort a sequence based on multiple key paths. #796 by MaxHaertwig.
    • KeyedDecodingContainer:
      • Added decodeBoolAsIntOrString(key:) to try to decode a Bool as Int then String before decoding as Bool. #750 by FraDeliro.
      • Added decodeBoolAsIntOrStringIfPresent(key:) to try to decode a Bool as Int then String before decoding as Bool if present. #750 by FraDeliro.
    • Locale:
      • Added is12HourTimeFormat to indicate if locale has 12h format. #793 by DimaZava.
      • flagEmoji(forRegionCode:) to convert a region code into the corresponding flag emoji. #813 by guykogus
    • URLRequest:
      • init(string:relativeTo:) to allow initializing a URL with an optional String. #818 by guykogus
      • Added curlString property to get a cURL command representation of this URL request. #790 by DimaZava.
    • SKProduct:
    • CGRect
      • Added property center. #814 by qchenqizhi.
      • Added initializer init(center:size:) to create CGRect with center and size. #814 by qchenqizhi.
      • Added resizing(to:anchor:) to create CGRect by resizing with anchor. #814 by qchenqizhi.

    πŸ”„ Changed

    • Collection:
      • Refactored group(by:) to be generic for all Collections, not only where Index == Int. #758 by guykogus
    • UIImage:
      • Implemented filled(withColor:) using UIGraphicsImageRenderer when available. #733
      • Updated kilobytesSize to be computed independently from bytesSize #753 by mmdock
      • Updated init?(base64String:) to take in a scale factor paramater. #753 by mmdock
    • UIImage:
      • Refactored tint(_:blendMode:) using UIGraphicsImageRenderer if available. #731 by FraDeliro.
    • Sequence:
      • Corrected documentation for sorted(by:with:) and sorted(by:). #751 by mmdock
    • NSAttributedString:
      • Update applying(attributes: [NSAttributedString.Key : Any], toRangesMatching pattern: String) to respond applying(attributes: [NSAttributedString.Key : Any], toRangesMatching pattern: String, options: NSRegularExpression.Options = []) signature to support regular expression options. #791 by DimaZava
    • UIButton:
      • Refactored centerTextAndImage(spacing:): now the image position can be above the text, by setting a new parameter imageAboveText to true. #807 by qchenqizhi.
    • String:
      • Bug fix String[safe:], subscript should not crash. #816 by cHaLkdusT

    πŸ›  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.

  • v5.1.0 Changes

    September 23, 2019

    βž• Added

    • Array:

      • Added withoutDuplicates(keyPath:) for filtering duplicate elements based on key path. #704 by RomanPodymov.
    • 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 a Sequence with by a given keyPath using a compare function. #712 by LucianoPAlmeida
    • MutableCollection:

      • Added sort(by:with:) to sort a Collection with by a given keyPath using a compare function. #712 by LucianoPAlmeida
    • String

      • isPalindrome computed property of String to check if it is a palindrome. #671 by cHaLkdusT.
    • CGSize:

      • Added aspectRatio, maxDimension, and minDimension properties. #662 by MaxHaertwig.
    • 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:), and init(sideLength:chamferRadius:color:) convenience initializers. #660 by MaxHaertwig.
    • SCNCapsule:

      • Added init(capDiameter:height), init(capRadius:height:material:), init(capDiameter:height:material:), init(capRadius:height:color:), and init(capDiameter:height:color:) convenience initializers. #660 by MaxHaertwig.
    • SCNCone:

      • Added init(topDiameter:bottomDiameter:height), init(topRadius:bottomRadius:height:material:), init(topDiameter:bottomDiameter:height:material:), init(topRadius:bottomRadius:height:color:), and init(topDiameter:bottomDiameter:height:color:) convenience initializers. #660 by MaxHaertwig.
    • SCNCylinder:

      • Added init(diameter:height), init(radius:height:material:), init(diameter:height:material:), init(radius:height:color:), and init(diameter:height:color:) convenience initializers. #660 by MaxHaertwig
    • SCNGeometry:

      • Added boundingSize property to get the size of the geometry's bounding box. #660 by MaxHaertwig.
    • SCNMaterial:

    • SCNPlane:

      • Added init(width:), init(width:height:material:), init(width:material:), init(width:height:color:), and init(width:color:) convenience initializers. #660 by MaxHaertwig.
    • SCNShape:

      • Added init(path:extrusionDepth:material:) and init(path:extrusionDepth:color:) convenience initializers. #660 by MaxHaertwig.
    • SCNSphere:

      • Added init(diameter:), init(radius:material:), init(radius:color:), init(diameter:material:), and init(diameter:color:) convenience initializers. #660 by MaxHaertwig.
    • 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.
    • UICollectionView:

      • Added isValidIndexPath(_:) method to check whether given IndexPath is valid within UICollectionView. #695 by emilrb.
      • Added safeScrollToItem(at:at:animated:) method to safely scroll UICollectionView to the given IndexPath. #698 by emilrb
    • Sequence:

      • Moved divided(by:) ArrayExtensions to SequenceExtensions. This function separates all items into 2 lists based on a given predicate. #706 by cHaLkdusT
    • UIBezierPath:

      • Added init(from:to:), init(points:), init(polygonWithPoints:), init(ovalOf:centered:) and init(rectOf:centered:) convenience initializers. #659 by MaxHaertwig.

    πŸ”„ Changed

    • UIApplication:

    • Sequence:

    πŸ—„ Deprecated

    • Array:
      • Deprecated sorted(by:, ascending) and sort(by:ascending) in favor of sorted(by:with:) and sort(by:with:) #712 by LucianoPAlmeida

    βœ‚ Removed

    • Character:

      • Removed isNumber, isLetter, isLowercased, isUppercased and isWhiteSpace because the same properties are defined in the Swift standard library. #689 by RomanPodymov.
    • Array:

      • Removed divided(by:) function from ArrayExtensions #706 by cHaLkdusT

    πŸ›  Fixed

    • UIApplication:

      • Resolved an issue where version would return the wrong Info.plist value.
      • Resolved an issue where version and displayName would return nil if localized.
    • 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:) and scaled(toWidth:opaque:) will now keep the original scale of UIImage. #703 by ShannonChou
    • UITableView:

      • isValidIndexPath(_:) will now return false for IndexPaths with a negative row or section. #696 by emilrb.

  • 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
    • Optional:
      • Added nonEmpty to get the collection only if it is not nill and not empty. by omaralbeik
    • FileManager:
      • Added createTemporaryDirectory() to create a directory for saving temporary files. #615 by guykogus
    • UILabel:
      • Added init(text:style) to create a UILabel with a text and font style. #607 by marcocapano
    • UIViewController
      • Added presentPopover(_:sourcePoint:size:delegate:animated:completion:) method to quickly present a UIViewController as a popover. #593 by marcocapano
    • Sequence:
      • Added duplicates() for getting the duplicated elements in a sequence. #605 by dylancfe15
    • Date:
    • βž• Added tomorrow computed property to get tomorrow's date avoiding calling adding(_:value:) function. (Completes PR #578) #587 by AlexeiGitH
      • Added random(in:) and random(in:using:) to generate random dates using the built-in random functions added to Swift 4.2. #576 by guykogus
    • Dictionary:
      • Added Dictionary[path:] subscript for deep fetching/setting nested values. #574 by @calebkleveter
    • UIColor:
    • DispatchQueue:
      • Added isMainQueue to check if current queue is main queue. #585 by jianstm
      • Added isCurrent(_:) to check if current queue is specified queue. #585 by jianstm
    • BidirectionalCollection:
      • Added subscript[offset:] to get element with negative offset. #582 by jianstm
    • BinaryFloatingPointExtensions:
      • Added rounded(numberOfDecimalPlaces:rule:) to get the rounded floating number with the specified number of decimal places. #583 by jianstm
    • UIActivity:
      • Added ActivityType constants for iCloud Drive, WhatsApp, LinkedIn and XING. #580 by staffler-xyz
    • MKMapView
      • Added 'register(annotationViewWithClass:),dequeueReusableAnnotationView(withClass:)anddequeueReusableAnnotationView(withClass:annotation)` methods. #629 by staffler-xyz

    πŸ”„ Changed

    • Character:
    • String:
      • Added more cases to isEmoji. by omaralbeik
      • Made camelize, latinize, reverse, slice, trim, truncate, urlDecode, urlEncode, padStart, and padEnd return a discardableResult self. by omaralbeik
    • Examples:
      • Replaced Examples.md with Examples.playground to let users try some examples out of extensions. #596 by maxxx777
    • StringProtocol:
      • Removing Index constraint on commonSuffix extension and improving performance and tests. #606 by LucianoPAlmeida.
    • RangeReplaceableCollection:
      • Array extensions keep(while: ), take(while: ) and skip(while:) are now RangeReplaceableCollection 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

    • UIImageView:
      • Fixed download function to use unowned self. by omaralbeik
    • Installation:
      • Updated podspec to make the group paths in Pods project of SwifterSwift correct with Cocoapods installation. #590 by dklinzh
    • UIImage:
    • NSAttributedString:
    • 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.

    βœ‚ Removed

    • SwifterSwift:
      • Breaking Change Removed SwifterSwift by omaralbeik.
    • Collection:
      • Removed firstIndex(where: ), firstIndex(of:), lastIndex(where: ), lastIndex(of:) which are no longer needed. #637 by marcocapano
    • Date:
      • Removed random(from:upTo:) in favor of random(in:) and random(in:using:). #576 by guykogus
      • Removed timeZone should never have been added because Dates are timezone-agnostic. This came to my attention during unit testing over daylight savings changes. #594 by guykogus

    CI

    • ⚑️ Updated Travis to use the new xcode10.2 osx_image.
    • βž• Added Fastlane to automate the releasing process for maintainers.

  • v4.6.0 Changes

    September 28, 2018

    βž• Added

    • Date
      • Added yesterday computed property to quickly get yesterday's date to avoid calling adding(_:value:) function. #578 by AlexeiGitH
    • UIView
      • Added ancestorView(where:) and ancestorView(withClass:) to search for a view in the superviews. #560 by overovermind ### πŸ›  Fixed
    • πŸ›  Fixed Cocoapods installation setting the correct Swift version

  • 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
    • Dictionary:
      • Added removeValueForRandomKey() to remove a value for a random key from a dictionary. #497 by MaxHaertwig.
      • Added mapKeysAndValues(_:) to map a Dictionary into a Dictionary with different (or same) Key and Value types. #546 by guykogus
      • Added compactMapKeysAndValues(_:) to map a Dictionary into a Dictionary, excluding nil results, with different (or same) Key and Value types. #546 by guykogus
      • Added keys(forValue:) which returns an array of all keys that have the given value in dictionary. #561 by mauliksharma.
    • RangeReplaceableCollection:
      • Added removeRandomElement() to remove a random element from a collection. #497 by MaxHaertwig.
    • UIView
      • Added addGestureRecognizers(_:) which accepts an array of UIGestureRecognizer to add multiple gesture recognizers to a view with one call. #523 by moyerr
      • Added removeGestureRecognizers(_:) which accepts an array of UIGestureRecognizer to remove multiple gesture recognizers from a view with one call. #523 by moyerr
    • UIViewController
      • Added addChildViewController(_:toContainerView) to easily add child view controllers. Accepts a UIViewController and a UIView to add the child's view to.
      • Added removeViewAndControllerFromParentViewController() to remove a UIViewController from its parent.
    • NSView
      • Added backgroundColor which allows to change backgroundColor of NSView #702 by RomanPodymov
    • UIEdgeInsets
      • Added insetBy(top:), insetBy(left:), insetBy(bottom:), insetBy(right:), insetBy(horizontal:) and insetBy(vertical:) to creates an UIEdgeInsets 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
    • 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.
    • RangeReplaceableCollection
      • init(expression:count:) to create a collection of a given count initialized with an expression.#537 by LucianoPAlmeida.
    • Optional:
      • Added ?= operator to assign to nil optionals only. #538 by viktart
    • Data:
      • Added jsonObject(options:) to convert a data object into a JSON object. #542 by guykogus
    • URL
      • Added droppedScheme() which returns new URL that does not have scheme. #528 by sammy-sc
    • 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 and CGFloat * 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.
    • UIImage:
      • Added rotate(by:) for generating rotated versions of images. There are 2 versions, one where the angle is passed directly as a CGFloat in radians, the other using the Measurement class, which is only available for iOS 10+/tvOS 10+/watchOS 3+. #555 by guykogus

    πŸ”„ Changed

    • RangeReplaceableCollection:
      • rotate(by:) and rotated(by:) array extensions now are more generic RangeReplaceableCollection extensions. #512 by LucianoPAlmeida.
      • removeFirst(where:) array extension now is more generic RangeReplaceableCollection extensions. #516 by LucianoPAlmeida.
    • RandomAccessCollection:
      • indices(of:) array extension now is more generic RandomAccessCollection extensions. #516 by LucianoPAlmeida.
    • UIView:
      • Improved performance in fillToSuperview() UIView extension. #540 by viktart

    πŸ›  Fixed

    • UIImage:
    • πŸ›  Fixed scaled(toWidth:, with orientation:) and scaled(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

    πŸ—„ Deprecated

    • String:
      • isEmail property has been renamed to isValidEmail.

    βœ‚ Removed

    πŸ”’ Security


  • 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.
    • Comparable:
      • Added isBetween(min:max:) and clamped(min:max:) to confirm a value is between bounds or limit it between bounds. #466 by freak4pc.
    • UIScrollView:
      • Added snapshot method to get a full snapshot of a rendered scroll view. #457 by aliamcami.
    • UIGestureRecognizer:
      • Added removeFromView() method to remove recognizer from the view the recognizer is attached to. #456 by mmdock
    • Character:
      • Added randomAlphanumeric() method to generate a random alphanumeric Character. #462 by oliviabrown9
    • String:
      • Added firstCharacterUppercased() method to return a string with only the first character uppercased. #505 by happiehappie
    • UITextView:
      • Added wrapToContent() method which will remove insets, offsets, paddings which lies within UITextView's bounds and contenSize. #458 by ratulSharker
    • URL
      • Added deletingAllPathComponents() and deleteAllPathComponents() 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.
    • 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, and indexPathForLastRow and indexPathForLastRow(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.
    • Optional:
      • Added isNilOrEmpty property to check whether an optional is nil or empty collection.
    • UIWindow:
      • Added switchRootViewController method to switch root view controller with animation. #494 by omaralbeik.
    • 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.
    • 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.
    • UIEdgeInsets
      • Added horizontal and vertical properties. Also init(inset:) and init(horizontal: vertical:) initializers for convenience. #500 by LucianoPAlmeida.

    πŸ”„ Changed

    • UITableView:
      • dequeueReusableCell(withClass:for), dequeueReusableCell(withClass) now return UITableViewCell object, fatalError(...) if not found. #439 by jdisho
      • dequeueReusableHeaderFooterView(withClass)now returns UITableViewHeaderFooterView object, fatalError(...) if not found. #439 by jdisho
    • UICollectionView:
      • dequeueReusableCell(withClass:for) now returns UICollectionViewCell object, fatalError(...) if not found. #439 by jdisho
      • dequeueReusableSupplementaryView(ofKind:withClass:for)now returns UICollectionReusableView object, fatalError(...) if not found. #439 by jdisho
    • UIView:
      • Breaking Change firstResponder UIView extension is now a function and supports recursive find in the view hierarchy. #447 by LucianoPAlmeida.
    • UIImage:
      • scaled(toWidth:, opaque:, with orientation:) and scaled(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:) and contains(_:) 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:) and lastIndex(of:) has been changed from Array to Collection #470 by MaxHaertwig.
    • Dictionary
      • The removeAll(keys:) changed its paramenter keys to a generic Sequence instead of an Array. #482 by LucianoPAlmeida.

    πŸ—„ Deprecated

    🚚 >### Removed

    πŸ›  Fixed

    • UIImage:
      • scaled(toWidth:, with orientation:) and scaled(toHeight:, with orientation:) were ignoring an image's scale. #446 by MaxHaertwig.
      • init(color:size:) fixed to ensure that UIGraphicsEndImageContext is always called after UIGraphicsBeginImageContextWithOptions(_:_:_) #507 by guykogus

  • 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.
    • Sequence
      • all() method moved from ArrayExtensions to SequenceExtensions. #424 by n0an.
      • none() method moved from ArrayExtensions to SequenceExtensions. #424 by n0an.
      • Added any() method to return if any element of sequence elements conforms to given condition. #424 by n0an.
    • SignedInteger
      • added ordinalString(locale:) method to return string ordinal representation of number in specified locale language. #434 by n0an.
    • SignedNumeric
      • added spelledOutString(locale:) method to return string representation of number spelled in specified locale language. #434 by n0an.
    • String
      • added computed property isSpelledCorrectly to check if the given string has typos or not. #430 by n0an.
      • added removingPrefix(_ prefix:) method to remove given prefix from the string. #430 by n0an.
      • added removingSuffix(_ suffix:) method to remove given suffix from the string. #430 by n0an.
    • πŸ‘• SwiftLint:
      • reduced the number of disabled rules in .swiftlint.yml, please add disable and enable statements from now on when needed in code.
      • added SwiftLint to test targets to insure code style consistency across the project.

    πŸ”„ Changed

    • SignedNumeric:
      • asLocaleCurrency now returns an optional string.
    • Array:
      • rotate method now returns a discardableResult.
      • shuffle method now returns a discardableResult.
      • sort<T: Comparable>(by:, ascending:) method now returns a discardableResult.
      • keep method now returns a discardableResult.

    πŸ—„ Deprecated

    • UIStoryboard:
      • mainStoryboard property has been renamed to main.
    • Array:
      • deprecated pop method in favor of Swift’s popLast.
      • deprecated push method in favor of Swift’s append.
      • deprecated swap method in favor of Swift’s swapAt.
      • deprecated item(at index: Int) method in favor of subscript(safe:).
      • duplicatesRemoved method has been renamed to withoutDuplicates.
    • Bool:
      • deprecated toggled property, use !self instead.
      • deprecated toggle method, use self = !self instead.

    πŸ›  Fixed

    • String
      • Fixed UIView extension addShadow was not showing the shadow on view bug. #420 by LucianoPAlmeida.

  • v4.2.0 Changes

    March 11, 2018

    βž• Added

    • MKPolyline
      • Added .coordinates property, to return an array of coordinates for the provided polyline. #416 by @freak4pc.
      • Added init(coordinates:) initializer, to initialize a MKPolyline with a provided array of coordinates. #416 by @freak4pc.
    • Optional
      • Added .unwrapped(or:) method, to get the value wrapped by an optional or throw a custom error. #413 by @calebkleveter.
    • UIButton
      • added centerTextAndImage(spacing:) to Center align title text and image on UIButton. #365 by @imjog.
    • Array
      • added divided(by:) to separate an array into 2 arrays based on a predicate. #367 by @neoneye.
    • Int
      • added roundToNearest(n:) to round an integer to the closest multiple of a given n. #381 by MaxHaertwig.
    • 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.
    • Int
      • added a more performant and memory efficient digits property to return array of integers. #393 by FrankKair.
    • StringProtocol
      • added commonSuffix(with:, options:) to get the longest common suffix of the receiver and a given string. #379 by MaxHaertwig.
    • 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.
    • UIFont
    • 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.
    • 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.
    • 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.
    • 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.
    • String
      • added computed property isWhitespace to check if the given string is blank or not.#363 by rkp1026.
      • added isDigits to check if string only contains digits. #396 by seifeet.
      • added toSlug() to return a slug version of a given string. 397# by FrankKair
    • New UIStackView
      • added init(arrangedSubviews:, axis:, spacing:, alignment:, distribution:) to directly initialize a UIStackView with an array of UIViews. #409 by BennX

    πŸ›  Fixed

    • String
      • Fixed isNumeric to check if string is a valid Swift number and added isDigits to check if string only contains digits. #396 by seifeet.
    • Collection

  • 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.
    • 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.
    • Array
      • Added sort(by: KeyPath) and sorted(by: KeyPath) to sort arrays based on Swift 4 keyPath. #343 by LucianoPAlmeida.
    • String
      • Added loremIpsum(ofLength: ) static function to return a lorem ipsum string. #318 by omaralbeik.
    • UIDatePicker
      • Added textColor to get and set the text color of a UIDatePicker. #328 by omaralbeik.
    • NSImage
      • Added write(to url: URL, fileType type: _, compressionFactor: _) to write NSImage to url. #320 by omaralbeik.
    • 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.
    • UIViewController

      • Added showAlert(title: String?, message: String?, buttonTitles: [String]?, highlightedButtonIndex: Int?, completion: ((Int) -> ())?) for conveniently displaying an alert from any view controller #364 by rkp1026 ### πŸ”„ Changed
    • Array

      • Breaking Change indexes(of:) has been renamed to indices(of:). #355 by Najdan
      • shuffle and shuffled are no more constrained to Equatable. #327 by LucianoPAlmeida.

    πŸ›  Fixed

    • Int
      • Fixed where the base in isPrime() was not correct. #323 by Asura19.
    • UINavigationBar
      • Fixed a bug where makeTransparent was keeping the background color. #344 by omaralbeik.
    • Continuous Integration
      • Fixed swiftlint warning in NSImageExtensions.