Changelog History
Page 5
-
v1.3.4 Changes
UIViewExtensions:
- func addConstraints(withFormat: String, views: UIView...): Add Visual Format constraints
- func fillToSuperview(): Anchor all sides of the view into it's superview
- func anchor(top: NSLayoutYAxisAnchor?, left: NSLayoutXAxisAnchor?, bottom: NSLayoutYAxisAnchor?, right: NSLayoutXAxisAnchor?, topConstant: CGFloat, leftConstant: CGFloat, bottomConstant: CGFloat, rightConstant: CGFloat, widthConstant: CGFloat, heightConstant: CGFloat) -> [NSLayoutConstraint]: Add anchors from any side of the current view into the specified anchors and returns the newly added constraints.
- func anchorCenterXToSuperview(withConstant: CGFloat): Anchor center X into current view's superview with a constant margin value.
- anchorCenterYToSuperview(constant: CGFloat): Anchor center Y into current view's superview with a constant margin value.
- func anchorCenterSuperview(): Anchor center X and Y into current view's superview
IntExtensions:
- kFormatted: String formatted for values over ยฑ1000 (example: 1k, -2k, 100k, 1kk, -5kk..)
Thanks to Jonathan Bijos & zzjzz9266a for adding new extensions.
-
v1.3.2 Changes
โ Added CollectionViewExtensions
-
v1.3.1 Changes
ArrayExtensions:
- โ removed duplicated contains a method
- ๐ use of reducing to remove duplicates (Thanks to sairamkotha)
-
v1.3 Changes
This version adds more than 90 new extensions making it the widest extensions library available online for Swift 3 with more than 360 properties and methods for more than 35 type. โก๏ธ This is the biggest update since library launch! We're so excited ๐ค
Here are some changes:
- โก๏ธ Updated some properties and methods names to follow Swift API Design Guidelines.
- โ Added default values to methods parameters (where possible).
- ๐ All units documentation has been re-written in Xcode,
- Now you see "SwifterSwift: " at the beginning of description to know the source of the extension while writing your code.
- All method parameters and return types have been documented in Xcode as well.
- All extensions documentation has been re-written in Wiki, separating properties from methods in different tables.
- All extensions files re-organized in separate extensions based on type (properties, methods, initializers, ..)
- ๐ Fixed some bugs where some extensions were not public.
- ๐ New section explaining how to add new extensions in Contributing Guidelines
- And finally: new logo
-
v1.2.2 Changes
๐ New Extensions:
- UIColorExtensions:
- struct material: get Google material palette colors with ease
โก๏ธ Updated Extensions:
- UIColorExtensions:
- struct socialColors -> struct social
- UIColorExtensions:
-
v1.2.1 Changes
๐ New Extensions:
ConvenienceExtensions:
- func string(forKey: String): Get a string from UserDefaults
- func integer(forKey: String): Get an integer from UserDefaults
- func double(forKey: String): Get a double from UserDefaults
- func float(forKey: String): Get a float from UserDefaults
- func data(forKey: String): Get a data from UserDefaults
- func bool(forKey: String): Get a bool from UserDefaults
- func array(forKey: String): Get an array from UserDefaults
- func dictionary(forKey: String): Get a dictionary from UserDefaults
StringExtensions:
- func toDate(withFormat format: String): Return Date value from string of date format (if applicable).
- var toURL: Return URL from string (if applicable).
UIAlertControllerExtensions:
- addAction(title, style, isEnabled, handler): Add an action to Alert.
- addTextField(text, placeholder, editingChangedTarget, editingChangedSelector): Add a text field to Alert.
UINavigationBarExtensions:
- func setColors(background, text): Set Navigation Bar background and text colors.
โก๏ธ Updated Extensions:
ConvenienceExtensions:
- var deviceHeight -> var screenHeight
- var deviceWidth -> var screenWidth
ArrayExtensions:
- func removeAll(item: Element) -> func removeAll(_ item: Element))
DateExtensions:
- func add(component: Calendar.Component, value: Int) -> add(_ component: Calendar.Component, value: Int)
- func adding(component: Calendar.Component, value: Int) -> adding(_ component: Calendar.Component, value: Int)
- func changing(component: Calendar.Component, value: Int) -> changing(_ component: Calendar.Component, value: Int)
- func isIn(current: Calendar.Component) -> isInCurrent(_ component: Calendar.Component)
StringExtensions:
- func contain(string: String, caseSensitive: Bool) -> func contain(_ string: String, caseSensitive: Bool)
- func lines() -> var lines
- static func random(of length: Int) -> static func random(ofLength: Int)
- func replace(string: String, with: String) -> func replace(_ substring: String, with: String)
- func truncate(to length: Int, trailing: String?) -> func truncate(toLength: Int, trailing: String?)
- func truncated(to length: Int, trailing: String? = "...") -> func truncated(to length: Int, trailing: String?)
UIButtonExtensions:
- func imageForAllStates(image: UIImage) -> func setImageForAllStates(_ image: UIImage)
- func titleColorForAllStates(color: UIColor) -> func setTitleColorForAllStates(_ color: UIColor)
- func titleForAllStates(title: String) -> func setTitleForAllStates(_ title: String)
UIColorExtensions:
- init(netHex:Int) -> init(hex:Int, transparency: CGFloat = 1)
UIImageExtensions:
- func scaledToHeight(height: CGFloat, with orientation: UIImageOrientation?) -> scaled(toHeight: CGFloat, with orientation: UIImageOrientation?)
- func scaledToWidth(width: CGFloat, with orientation: UIImageOrientation?) -> scaled(toWidth: CGFloat, with orientation: UIImageOrientation?)
UIImageViewExtensions:
- func download(fromUrl: String?, contentMode: UIViewContentMode, placeHolder: UIImage?)) -> download(from: URL?, contentMode: UIViewContentMode, placeHolder: UIImage?, completionHandler: ((UIImage?, Error?) -> Void)?)
UISliderExtensions:
- func setValue(value: Float, animated: Bool, duration: TimeInterval, completion: (() -> Void)? = nil) -> func setValue(_ value: Float, animated: Bool, duration: TimeInterval, completion: (() -> Void)?)
UITableViewExtensions:
- var totalRows -> var numberOfRows
UITextFieldExtensions:
- func setPlaceHolderTextColor(color: UIColor) -> func setPlaceHolderTextColor(_ color: UIColor)
UIViewExtensions:
- func loadFromNibNamed(nibNamed: String, bundle : Bundle?) -> func loadFromNib(named: String, bundle : Bundle?)
โ Removed Extensions:
- StringExtensions:
- var locale
-
v1.1 Changes
UISearchBarExtensions:
- textField: Return the text field inside search bar
UITextFieldExtensions:
- setPlaceHolderTextColor(color): Change place holder text color
- leftViewTintColor: Left view tint color
- rightViewTintColor: Right view tint color
UINavigationItemExtensions:
- replaceTitle(with image): Replace title with an image in naivgation item
UITabBarExtensions:
- setColors(background, selectedBackground, item, selectedItem): Change UITabBar colors
UIImageExtensions:
- filled(withColor): Return image filled with color
- init(color, size): Create image from color and size
UITextViewExtensions:
- scrollToBotom(): Scroll to the bottom of text view
- scrollToTop(): Scroll to the top of text view
UISegmentedControlExtensions:
- segmentTitles: Segments titles
- segmentImages: Segments images
UISliderExtensions:
- setValue(value, animated, duration, completion): Set slide bar value with completion handler
UIAlertControllerExtensions:
- ๐ show(vibrate): Added optional vibration while presenting the alert
IntExtensions:
- asLocaleCurrency: Return string with number and current locale currency
FloatExtensions:
- asLocaleCurrency: Return string with number and current locale currency
DoubleExtensions:
- asLocaleCurrency: Return string with number and current locale currency
StringExtensions:
- ๐ Fixed a bug in toDouble, toFloat, toFloat32, toFloat64 where number is not calculated if not in English
DateExtensions:
- โ adding(component, value): Return date by adding a component
- nearestHourQuarter: Return the nearest quarter to date
- nearestHalfHour: Return nearest half hour to date
- changing(component, value): Return date by changing a component
- ๐ Fixed a bug in nearestFiveMinutes, nearestTenMinutes where date was always rounded always to next 5, 10 mins
-
v1.0.4 Changes
UILabelExtensions:
- requiredHeight: Return required height for a label
UIImageViewExtensions:
- ๐ blur(withStyle: UIBlurEffectStyle): Make image view blurry
- ๐ blurred(withStyle: UIBlurEffectStyle): Return a blurred version of an image view
UINavigationControllerExtensions:
- ๐ makeTransparent(withTint: UIColor): Make navigation controller's navigation bar transparent
UINavigationBarExtensions:
- ๐ makeTransparent(withTint: UIColor): Make navigation controller's navigation bar transparent
UITextFieldExtensions:
- trimmedText: Return text with no spaces or new lines in beginning and end
UIViewExtensions:
- โ addShadow(ofColor, radius, offset, opacity): /// Add shadow to view
UIImageExtensions:
- filled(withColor): Return image filled with color
DateExtensions:
- nearestFiveMinutes: Return nearest five minutes to date
- nearestTenMinutes: Return nearest ten minutes to date
UIViewExtensions:
- shake: Completion handler added to shake function