Merge branch 'feature/clipping_image' into 'develop'

For molecularly clipping image

See merge request BPHV_MIPS/mvm_core_ui!583
This commit is contained in:
Pfeil, Scott Robert 2020-09-11 12:11:50 -04:00
commit dbf98672d2
2 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import Foundation
public var contentMode: UIView.ContentMode?
public var localBundle: Bundle?
public var cornerRadius: CGFloat?
public var clipsImage: Bool?
public init(image: String, imageFormat: String? = nil, width: CGFloat? = nil, height: CGFloat? = nil) {
self.image = image
@ -40,5 +41,6 @@ import Foundation
case height
case contentMode
case cornerRadius
case clipsImage
}
}

View File

@ -254,6 +254,10 @@ import UIKit
clipsToBounds = true
layer.cornerRadius = cornerRadius
}
if let clipsImage = imageModel.clipsImage {
clipsToBounds = clipsImage
}
}
// MARK: - load functions