SwifterSwift v4.4.0 Release Notes
Release Date: 2018-06-29 // almost 6 years ago-
β 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: