Merge branch 'bugfix/dropshadow_opacity' into 'develop'
Vz up See merge request BPHV_MIPS/mvm_core_ui!558
This commit is contained in:
commit
236c42b61c
@ -20,6 +20,7 @@ import Foundation
|
|||||||
public var height: CGFloat?
|
public var height: CGFloat?
|
||||||
public var contentMode: UIView.ContentMode?
|
public var contentMode: UIView.ContentMode?
|
||||||
public var localBundle: Bundle?
|
public var localBundle: Bundle?
|
||||||
|
public var cornerRadius: CGFloat?
|
||||||
|
|
||||||
public init(image: String, imageFormat: String? = nil, width: CGFloat? = nil, height: CGFloat? = nil) {
|
public init(image: String, imageFormat: String? = nil, width: CGFloat? = nil, height: CGFloat? = nil) {
|
||||||
self.image = image
|
self.image = image
|
||||||
@ -38,5 +39,6 @@ import Foundation
|
|||||||
case width
|
case width
|
||||||
case height
|
case height
|
||||||
case contentMode
|
case contentMode
|
||||||
|
case cornerRadius
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -223,6 +223,8 @@ import UIKit
|
|||||||
|
|
||||||
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
self.delegateObject = delegateObject
|
self.delegateObject = delegateObject
|
||||||
|
super.set(with: model, delegateObject, additionalData)
|
||||||
|
|
||||||
guard let imageModel = model as? ImageViewModel else { return }
|
guard let imageModel = model as? ImageViewModel else { return }
|
||||||
if let accessibilityString = imageModel.accessibilityText {
|
if let accessibilityString = imageModel.accessibilityText {
|
||||||
imageView.accessibilityLabel = accessibilityString
|
imageView.accessibilityLabel = accessibilityString
|
||||||
@ -247,6 +249,11 @@ import UIKit
|
|||||||
if let contentMode = imageModel.contentMode {
|
if let contentMode = imageModel.contentMode {
|
||||||
imageView.contentMode = contentMode
|
imageView.contentMode = contentMode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let cornerRadius = imageModel.cornerRadius {
|
||||||
|
clipsToBounds = true
|
||||||
|
layer.cornerRadius = cornerRadius
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - load functions
|
// MARK: - load functions
|
||||||
|
|||||||
@ -272,7 +272,7 @@ static const CGFloat VertialShadowOffset = 6;
|
|||||||
|
|
||||||
view.layer.shadowColor = [UIColor blackColor].CGColor;
|
view.layer.shadowColor = [UIColor blackColor].CGColor;
|
||||||
view.layer.shadowOffset = CGSizeMake(0.0f, VertialShadowOffset);
|
view.layer.shadowOffset = CGSizeMake(0.0f, VertialShadowOffset);
|
||||||
view.layer.shadowOpacity = 0.7f;
|
view.layer.shadowOpacity = 0.25f;
|
||||||
view.layer.shadowPath = shadowPath.CGPath;
|
view.layer.shadowPath = shadowPath.CGPath;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user