diff --git a/MVMCoreUI/Atomic/Atoms/Views/TileContainer.swift b/MVMCoreUI/Atomic/Atoms/Views/TileContainer.swift index 8356089c..4737c2db 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/TileContainer.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/TileContainer.swift @@ -109,30 +109,8 @@ open class TileContainer: VDS.TileContainer, VDSMoleculeViewProtocol{ self.delegateObject?.moleculeDelegate?.moleculeLayoutUpdated(self) } } - - public func needsToBeConstrained() -> Bool { true } - - public func horizontalAlignment() -> UIStackView.Alignment { .leading } } -extension UIImageView { - public func loadImage(withName imageName: String?, format: String? = nil, width: CGFloat? = nil, height: CGFloat? = nil, customFallbackImage: String? = nil, allowServerParameters: Bool = false, localBundle: Bundle? = nil, completionHandler: MVMCoreGetImageBlock? = nil) { - - MVMCoreDispatchUtility.performBlock(onMainThread: { [unowned self] in - - let finishedLoadingBlock: MVMCoreGetImageBlock = {[weak self] (image, data, isFallbackImage) in MVMCoreDispatchUtility.performBlock(onMainThread: { [weak self] in - guard let self = self else { return } - self.image = image - completionHandler?(image,data,isFallbackImage) - })} - - let fallbackImageName = customFallbackImage ?? MVMCoreUIUtility.localizedImageName("fallback") - if let format = format, format.lowercased().contains("gif") { - // Gifs aren't supported by default and need special handling - MVMCoreCache.shared()?.getGif(imageName, useWidth: width != nil, widthForS7: Int(width ?? 0), useHeight: height != nil, heightForS7: Int(height ?? 0), format: format, localFallbackImageName: fallbackImageName, allowServerQueryParameters: allowServerParameters, localBundle: localBundle, completionHandler: finishedLoadingBlock) - } else { - MVMCoreCache.shared()?.getImage(imageName, useWidth: width != nil, widthForS7: Int(width ?? 0), useHeight: height != nil, heightForS7: Int(height ?? 0), format: format, localFallbackImageName: fallbackImageName, allowServerQueryParameters: allowServerParameters, localBundle: localBundle, completionHandler: finishedLoadingBlock) - } - }) - } +extension TileContainer: MVMCoreUIViewConstrainingProtocol { + public func horizontalAlignment() -> UIStackView.Alignment { .leading } }