removed code not nedded
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
300047fdbe
commit
f5d9423b1b
@ -109,30 +109,8 @@ open class TileContainer: VDS.TileContainer, VDSMoleculeViewProtocol{
|
|||||||
self.delegateObject?.moleculeDelegate?.moleculeLayoutUpdated(self)
|
self.delegateObject?.moleculeDelegate?.moleculeLayoutUpdated(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func needsToBeConstrained() -> Bool { true }
|
|
||||||
|
|
||||||
public func horizontalAlignment() -> UIStackView.Alignment { .leading }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension UIImageView {
|
extension TileContainer: MVMCoreUIViewConstrainingProtocol {
|
||||||
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) {
|
public func horizontalAlignment() -> UIStackView.Alignment { .leading }
|
||||||
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user