SwifterSwift v1.6.3 Release Notes
-
New Character extensions
- new * operator (repeat character n amount of times)
- added isLowercased & isUppercased extensions
New UICollectionView extensions
- new extensions to register/dequeue cells using UICollectionViewCell class as identifier
- new extensions to register/dequeue reusable views using UICollectionReusableView class as identifier
New UITableView extensions
- new extensions to register/dequeue cells using UITableViewCell class as identifier
- new extensions to register/dequeue header/footer views using UITableViewHeaderFooterView as identifier
New UIStoryboard extensions
- added extension to
instantiateViewController
with class as identifier - added extension get
mainStoryboard
- added extension to
New UIView extensions
- added quick getter and setter for frameβs X and Y values
New Array extensions
- added
safeSwap
method as a fail-safe way to swap to elements in an array
- added
New NSView extensions
borderColor
(IBInspectable)borderWidth
(IBInspectable)cornerRadius
(IBInspectable)height
shadowColor
(IBInspectable)shadowOffset
(IBInspectable)shadowOpacity
(IBInspectable)shadowRadius
(IBInspectable)size
width
addSubviews(subviews:)
removeSubviews()
New Optional extensions
unwrapped(or:)
unwrap an optional or provide default valuerun(block:)
block to run if optional unwrapped is not nil
π Improvements
π Improve UIImageView extensions
- fixes infinite recursive call in
blurred()
method - removes superfluous error from
download(url:)
method completion block
- fixes infinite recursive call in
π Replace deprecated
M_PI
with.pi
π Fixes wrong implementation of -=
CGPoint
operatorπ Improve Array extensions
- properties with O(n) or higher complexity have been changed to methods
- reduced shuffle method complexity by using Fisher-Yates algorithm and is now completely random
removeDuplicates
renamed toduplicatesRemoved.
- remove generic constraint on
firstIndex(of:)
andlastIndex(of:)
π Improve String extensions
π Improve Date extensions
π Improve Data extensions
π Improve Dictionary extensions
β Testing
π This release has drastically increased test coverage: currently 88%. Areas affected are:
Foundation
- CharacterExtensions tests - StringExtensions tests - ArrayExtensions tests - IntExtensions tests - DateExtensions tests - DataExtensions tests - DoubleExtensions tests - FloatExtensions tests - CGFloatExtensions tests - CGPointExtensions tests
UIKit
- UIColorExtensions tests - UIAlertControllerExtensions tests - UIBarButtonItemExtensions tests - UIButtonExtensions tests - UITextViewExtensions tests - UISegmentedControlExtensions tests - UINavigationControllerExtensions tests - UINavigationBarExtensions tests - UINavigationItemExtensions tests - UISliderExtensions tests - UITableViewExtensions tests - UICollectionViewExtensions tests - UIViewControllerExtensions tests - UIStoryboardExtensions tests - UITextFieldExtensions tests - UIViewExtensions tests - UIImageExtensions tests
Cocoa
- NSColorExtensions tests - NSViewExtensions tests