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:
commit
dbf98672d2
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,6 +254,10 @@ import UIKit
|
||||
clipsToBounds = true
|
||||
layer.cornerRadius = cornerRadius
|
||||
}
|
||||
|
||||
if let clipsImage = imageModel.clipsImage {
|
||||
clipsToBounds = clipsImage
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - load functions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user