diff --git a/TymateSwiftExtensions.podspec b/TymateSwiftExtensions.podspec index e4184bf..9bf45ec 100644 --- a/TymateSwiftExtensions.podspec +++ b/TymateSwiftExtensions.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = "TymateSwiftExtensions" - spec.version = "0.0.1" + spec.version = "0.0.2" spec.summary = "A CocoaPods library written in Swift" spec.description = <<-DESC diff --git a/TymateSwiftExtensions.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate b/TymateSwiftExtensions.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate index 7263ba5..f230e73 100644 Binary files a/TymateSwiftExtensions.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate and b/TymateSwiftExtensions.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TymateSwiftExtensions/UIImageViewExtensions.swift b/TymateSwiftExtensions/UIImageViewExtensions.swift index 1919510..2c3ef04 100644 --- a/TymateSwiftExtensions/UIImageViewExtensions.swift +++ b/TymateSwiftExtensions/UIImageViewExtensions.swift @@ -7,21 +7,21 @@ // import Foundation -import Kingfisher +//import Kingfisher public extension UIImageView { - func loadImage(withUrl url: String?, - andPlaceHolder placeHolder: UIImage? = nil, preloadWithPlaceHolder: Bool = true) { - if preloadWithPlaceHolder { - self.image = placeHolder ?? UIImage(named: "placeholder") - } - guard let urlString = url, let url = URL(string: urlString) else { - self.image = placeHolder ?? UIImage(named: "placeholder") - return - } - let resource = ImageResource(downloadURL: url, cacheKey: url.path) - self.kf.setImage(with: resource, placeholder: placeHolder) - } +// func loadImage(withUrl url: String?, +// andPlaceHolder placeHolder: UIImage? = nil, preloadWithPlaceHolder: Bool = true) { +// if preloadWithPlaceHolder { +// self.image = placeHolder ?? UIImage(named: "placeholder") +// } +// guard let urlString = url, let url = URL(string: urlString) else { +// self.image = placeHolder ?? UIImage(named: "placeholder") +// return +// } +// let resource = ImageResource(downloadURL: url, cacheKey: url.path) +// self.kf.setImage(with: resource, placeholder: placeHolder) +// } func designRounded(radius: Int) { self.layer.cornerRadius = CGFloat(radius) diff --git a/TymateSwiftExtensions/UIViewController.swift b/TymateSwiftExtensions/UIViewController.swift index 66da18d..4488c7f 100644 --- a/TymateSwiftExtensions/UIViewController.swift +++ b/TymateSwiftExtensions/UIViewController.swift @@ -8,18 +8,18 @@ import Foundation import UIKit -import Toast_Swift +//import Toast_Swift extension UIViewController { - func showToast(title: String, subtitle: String? = nil, image: UIImage? = nil, duration: TimeInterval = 3, position: ToastPosition = .bottom, view: UIView? = nil) { - let optionnalShowingView = view ?? self.tabBarController?.view ?? self.view - guard let showingView = optionnalShowingView else {return} - - if let subtitle = subtitle, subtitle.contains("offline") { - showingView.makeToast(NSLocalizedString("Pas de connexion internet. Vérifiez votre connexion et revenez sur la page.", comment: "Error internet connection"), duration: 8, position: position, title: title, image: UIImage.init(named: "icLostConnexion"), completion: nil) - } else { - showingView.makeToast(subtitle, duration: duration, position: position, title: title, image: image, completion: nil) - } - } +// func showToast(title: String, subtitle: String? = nil, image: UIImage? = nil, duration: TimeInterval = 3, position: ToastPosition = .bottom, view: UIView? = nil) { +// let optionnalShowingView = view ?? self.tabBarController?.view ?? self.view +// guard let showingView = optionnalShowingView else {return} +// +// if let subtitle = subtitle, subtitle.contains("offline") { +// showingView.makeToast(NSLocalizedString("Pas de connexion internet. Vérifiez votre connexion et revenez sur la page.", comment: "Error internet connection"), duration: 8, position: position, title: title, image: UIImage.init(named: "icLostConnexion"), completion: nil) +// } else { +// showingView.makeToast(subtitle, duration: duration, position: position, title: title, image: image, completion: nil) +// } +// } }