Skip to content

Releases: tbaranes/SwiftyUtils

v5.5.2

05 Oct 06:54
2ea7ce9
Compare
Choose a tag to compare

Enhancements

  • UISliderExtension:
func value(for gestureRecognizer: UITapGestureRecognizer) -> Float

Bugfixes

  • Xcode 14 support

v5.5.1

08 Dec 13:47
c82461b
Compare
Choose a tag to compare

Bugfixes

  • Fixed builds targeting armv7 using SPM

v5.5.0

08 Nov 15:38
cc5251f
Compare
Choose a tag to compare

Enhancements

  • UIViewControllerExtension:
func addSubSwiftUIView<Content>(_ swiftUIView: Content, to view: UIView) where Content: View
  • UIViewExtension:
var parentViewController: UIViewController?
func findView<T>() -> T?
func addSubSwiftUIView<Content>(_ swiftUIView: Content) where Content: View 
func addBorders(to edges: UIRectEdge, borderColor: UIColor, borderWidth: CGFloat)

v5.4.0

06 Oct 12:58
ca17b58
Compare
Choose a tag to compare

Bump min iOS version to 10 when using SPM. This is just to fix a warning from Xcode 12.

v5.3.0

02 Jul 13:09
cf5091c
Compare
Choose a tag to compare

Enhancements

  • UIViewControllerExtension:
var preview: some View
  • BindingExtension:
static func mock(_ value: Value) -> Self {
  • MutableCollection:
mutating func sort<T: Comparable>(by keyPath: KeyPath<Element, T>, order: (T, T) -> Bool = (<))
  • SequenceExtension:
func sorted<T: Comparable>(by keyPath: KeyPath<Element, T>, order: (T, T) -> Bool = (<)) -> [Element]
  • UITableViewExtension:
func register<T: UITableViewCell>(cellType: T.Type) where T: Reusable & NibLoadable
func register<T: UITableViewCell>(cellType: T.Type) where T: Reusable
func dequeueReusableCell<T: UITableViewCell>(for indexPath: IndexPath, cellType: T.Type = T.self) -> T where T: Reusable
func register<T: UITableViewHeaderFooterView>(headerFooterViewType: T.Type) where T: Reusable & NibLoadable
func register<T: UITableViewHeaderFooterView>(headerFooterViewType: T.Type) where T: Reusable
func dequeueReusableHeaderFooterView<T: UITableViewHeaderFooterView>(_ viewType: T.Type = T.self) -> T? where T: Reusable
  • UICollectionViewCellExtension:
func register<T: UICollectionViewCell>(cellType: T.Type) where T: Reusable & NibLoadable
func register<T: UICollectionViewCell>(cellType: T.Type) where T: Reusable T.self) -> T where T: Reusable
func register<T: UICollectionReusableView>(supplementaryViewType: T.Type, ofKind elementKind: String) where T: Reusable & NibLoadable
func register<T: UICollectionReusableView>(supplementaryViewType: T.Type, ofKind elementKind: String) where T: Reusable
func dequeueReusableSupplementaryView<T: UICollectionReusableView>(ofKind elementKind: String, for indexPath: IndexPath, viewType: T.Type = T.self) -> T where T: Reusable
  • Protocols:
protocol NibLoadable: AnyObject
protocol NibOwnerLoadable: AnyObject
protocol Reusable: AnyObject
typealias NibReusable = Reusable & NibLoadable

v5.2.0

28 Apr 12:17
a1cdf28
Compare
Choose a tag to compare

Enhancements

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

Bugfixes

  • Fixed missing swift sources added to the targets when using CocoaPods to embed SwiftyUtils

v5.1.0

26 Apr 08:50
62fae6b
Compare
Choose a tag to compare

Enhancements

  • Completing missing unit tests
  • Adding documentation to the code
  • Adding UIElementPreview, an easy way to generate mulitple SwiftUI previews with different configuration
  • BundleExtension:
var displayName: String
  • DictionaryExtension
func toData(options: JSONSerialization.WritingOptions = []) throws -> Data?
  • DataExtension:
func toDictionary(options: JSONSerialization.ReadingOptions = []) throws -> [String: Any]?
  • NSAttributedStringExtension:
func isAttributeActivated(_ attribute: NSAttributedString.Key, appliedOn text: String, value: Any) -> Bool
  • UIApplicationExtension:
func openAppSettings()
func openAppStoreReviewPage(_ url: URL)
  • UIButtonExtension:
func addRightImage(_ image: UIImage?, offset: CGFloat)
  • UICollectionViewCellExtension:
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)
  • UIViewExtension:
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]) 
  • UIViewController:
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)
  • PropertyWrappers:
@UserDefaultsBacked(key: "defaults_key", defaultValue: 20)
var defaultValue: Int
@UserDefaultsBacked(key: "default_key2")
var defaultKey2: String?

v5.0.1

13 Nov 07:11
1d80d25
Compare
Choose a tag to compare

Bugfixes

Fixed SPM compilation

v5.0.0

12 Nov 15:49
bee97b2
Compare
Choose a tag to compare

API breaking changes

  • Xcode 11 and Swift 5 support

Enhancements

  • Moving from Travis to Github Actions
  • Updating Swiftlint and fix all related warnings

Bugfixes

  • Fixed SPM support

v4.0.0

27 Mar 14:19
Compare
Choose a tag to compare

API breaking changes

  • Xcode 10.2 and Swift 5 support

Enhancements

  • Added Data extensions
    • data to hex string
    • hex string to data
    • data to UInt8 array
  • Added SystemUtility struct with shell command access
  • added ip address validation extension to String