SwiftyUtils v5.1.0 Release Notes
Release Date: 2020-04-26 // about 3 years ago-
✨ 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?