Changelog

All notable changes to the project will be documented in this file.


Next

API breaking changes

N/A

Enhancements

N/A

Bugfixes

N/A

5.2.0 (28-04-2020)

Enhancements

class func dynamicStyle(_ style: UIFont.TextStyle, traits: UIFontDescriptor.SymbolicTraits?, sizeCategory: UIContentSizeCategory = .large) -> UIFont
func configureDynamicStyle(_ style: UIFont.TextStyle, traits: UIFontDescriptor.SymbolicTraits? = nil, minimumScaleFactor: CGFloat = 0.8)
func configureDynamicStyle(_ style: UIFont.TextStyle, traits: UIFontDescriptor.SymbolicTraits? = nil, adjustToFit: Bool = true)
func configureDynamicStyle(_ style: UIFont.TextStyle, traits: UIFontDescriptor.SymbolicTraits? = nil)

Bugfixes

5.1.0 (26-04-2020)

Enhancements

var displayName: String
func toData(options: JSONSerialization.WritingOptions = []) throws -> Data?
func toDictionary(options: JSONSerialization.ReadingOptions = []) throws -> [String: Any]?
func isAttributeActivated(_ attribute: NSAttributedString.Key, appliedOn text: String, value: Any) -> Bool
func openAppSettings()
func openAppStoreReviewPage(_ url: URL)
func addRightImage(_ image: UIImage?, offset: CGFloat)
func applyCornerRadius(_ radius: CGFloat)
func animate(scale: Bool, duration: TimeInterval = 0.35, transformScale: CGFloat = 0.97, damping: CGFloat = 0.7, options: UIView.AnimationOptions = [], delay: TimeInterval = 0.0, velocity: CGFloat = 0.0, completion: ((Bool) -> Void)? = nil)
func findView(forIdentifier identifier: String) -> UIView?
func addConstraints(to edges: UIRectEdge = .all, insets: UIEdgeInsets = .zero)
func applyCornerRadius(_ radius: CGFloat, maskedCorners: CACornerMask [.layerMaxXMaxYCorner, .layerMaxXMinYCorner, .layerMinXMaxYCorner, .layerMinXMinYCorner]) 
var isModal: Bool
func addChildController(_ controller: UIViewController, to subview: UIView, animated: Bool = true, duration: TimeInterval = 0.35, options: UIView.AnimationOptions = [.curveEaseInOut, .transitionCrossDissolve])
func addChild(_ child: UIViewController, in containerView: UIView)
func removeChildController(_ child: UIViewController)
func openSafariVC(withURL url: URL, delegate: SFSafariViewControllerDelegate, tintColor: UIColor = .black, barTintColor: UIColor = .white, barCollapsing: Bool = true)
@UserDefaultsBacked(key: "defaults_key", defaultValue: 20)
var defaultValue: Int
@UserDefaultsBacked(key: "default_key2")
var defaultKey2: String?

5.0.1 (12-11-2019)

Bugfixes

Fixed SPM compilation

5.0.0 (12-11-2019)

API breaking changes

Enhancements

Bugfixes

4.0.0 (27-03-2019)

API breaking changes

Enhancements

3.0.0 (18-09-2018)

API breaking changes

Bugfixes

2.0.0 (04-11-2017)

API breaking changes

Enhancements

public static func delegate<T: UIApplicationDelegate>(_ type: T.Type) -> T? 
public static func font(inText text: String, font: SwiftyFont, afterOcurrence occurence: String) -> NSMutableAttributedString
public func font(_ font: SwiftyFont, afterOcurrence occurence: String)

public static func font(inText text: String, font: SwiftyFont, occurences searchString: String) -> NSMutableAttributedString
public func font(_ font: SwiftyFont, occurences searchString: String)

Bugfixes

1.0.0 (17-03-2017)

In order to reach 1.0, SwiftyUtils got a huge cleanup:

Since that release contains a lot of changes we won't details them all.

We are really sorry to introduce that many breaking changes, but it was a mandatory cost to release 1.0! Also, the future release should have none (or a very low number) breaking changes and a lot of new features 🎉

A big thanks to Sweepr777 for reviewing all the PRs!

0.7.0 (15-01-2017)

API breaking changes

Enhancements

Note: Take a look into the README to see the details of all the following enhancements

public func setLineHeight(_ lineHeight: CGFloat)
public var x: CGFloat
public var y: CGFloat
public func with(x: CGFloat) -> CGRect
public func with(y: CGFloat) -> CGRect
public func with(width: CGFloat) -> CGRect
public func with(height: CGFloat) -> CGRect
public func with(origin: CGPoint) -> CGFloat
public func with(size: CGSize) -> CGFloat
public var x: CGFloat
public var y: CGFloat
public var width: CGFloat
public var height: CGFloat

0.6.0 (18-11-2016)

API breaking changes

Enhancements

Note: Take a look into the README to see the details of all the following enhancements

New protocols available:

New extensions:

public var f: CGFloat
subscript(safe index: Int) -> Element?
Too many things to be described here... check the README
func isTruncated() -> Bool
func setText(_ text: String, truncatedText: String)

New extensions for macOS:

func convertLocalizables()

0.5.0 (14-09-2016)

API breaking changes

Classes removed:

Extensions removed:

convenience init(hex: String, alpha: Float)
class func deviceModel() -> String

Enhancements

Note: Take a look into the README to see the details of all the following enhancements

New classes:

New iOS classes:

New extensions:

var redComponent: Int
var greenComponent: Int
var blueComponent: Int
var alpha: CGFloat
init?(value: Float, maxDigits: Int)
init?(value: Double, maxDigits: Int)
var appName: String
var appVersion: String
var appBuild: String
var schemes: String
var mainScheme: String

New iOS extensions:

static var main: UIStoryboard
func toggle(animated: Bool = true)
var original: UIImage
var template: UIImage

0.4.0 (11-09-2016)

API breaking changes

convenience init?(hexString: String)
convenience init?(hexString: String, alpha: Float)

becomes

convenience init(hex: String)
convenience init(hex: String, alpha: Float)

Enhancements

Note: Take a look into the README to see the details of all the following enhancements

New protocols available:

New extensions:

func darker(amount: CGFloat = 0.25) -> SwiftyColor
func lighter(amount: CGFloat = 0.25) -> SwiftyColor
func filled(with color: UIColor?) -> UIImage

0.3.0 (19-05-2016)

API breaking changes

Enhancements

Note: Take a look into the README to see the details of all the following enhancements

New extensions:

func postNotification(name name: String, object: AnyObject? = nil, userInfo: [NSObject : AnyObject]? = nil, queue: dispatch_queue_t)

New iOS extensions:

static func show(title title: String, message: String, cancelTitle: String = "OK")
func topViewController() -> UIViewController?
func forceRotation(orientation: UIInterfaceOrientation)

0.2.0 (09-05-2016)

Enhancements

Note: Take a look into the README to see the details of all the following enhancements

New extensions:

func shuffle()
func shuffleInPlace()
func applyMultiplier(multiplier: CGFloat, toView: SwiftyView)
func addSkipBackupAttribute()
init(rangeOf textToFind: String, in text: String)

New iOS extensions:

func deletePreviousViewControllers()
func setupBackButton(hidden hidden: Bool = false, title: String = "", backIndicatorImage: UIImage? = nil, tintColor: UIColor? = UIColor.whiteColor())
func setupRightBarView(view: UIView)
func setupLeftBarView(view: UIView)

0.1.0 (24-04-2016)

First version