border related issues fixed
This commit is contained in:
parent
d000715518
commit
b348bdfdab
@ -39,7 +39,7 @@ open class RadioBox: Control {
|
|||||||
super.setupView()
|
super.setupView()
|
||||||
|
|
||||||
layer.delegate = self
|
layer.delegate = self
|
||||||
layer.borderColor = UIColor.black.cgColor
|
layer.borderColor = UIColor.mfGet(forHex: "#747676").cgColor
|
||||||
layer.borderWidth = 1
|
layer.borderWidth = 1
|
||||||
|
|
||||||
label.numberOfLines = 1
|
label.numberOfLines = 1
|
||||||
@ -77,11 +77,12 @@ open class RadioBox: Control {
|
|||||||
// Draw the strikethrough
|
// Draw the strikethrough
|
||||||
strikeLayer?.removeFromSuperlayer()
|
strikeLayer?.removeFromSuperlayer()
|
||||||
if isOutOfStock {
|
if isOutOfStock {
|
||||||
let line = getStrikeThrough(color: .black, thickness: 1)
|
let line = getStrikeThrough(color: isSelected ?.black:UIColor.mfGet(forHex: "#747676") , thickness: 1)
|
||||||
layer.addSublayer(line)
|
layer.addSublayer(line)
|
||||||
strikeLayer = line
|
strikeLayer = line
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Draw the border
|
// Draw the border
|
||||||
borderLayer?.removeFromSuperlayer()
|
borderLayer?.removeFromSuperlayer()
|
||||||
if isSelected {
|
if isSelected {
|
||||||
@ -98,6 +99,7 @@ open class RadioBox: Control {
|
|||||||
if !isEnabled {
|
if !isEnabled {
|
||||||
let mask = getMaskLayer()
|
let mask = getMaskLayer()
|
||||||
layer.mask = mask
|
layer.mask = mask
|
||||||
|
maskLayer = mask
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -111,6 +111,10 @@ extension RadioBoxes: UICollectionViewDataSource {
|
|||||||
open func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
open func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||||
return boxes?.count ?? 0
|
return boxes?.count ?? 0
|
||||||
}
|
}
|
||||||
|
public func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
|
||||||
|
guard let molecule = boxes?[indexPath.row] else {return true }
|
||||||
|
return molecule.enabled
|
||||||
|
}
|
||||||
|
|
||||||
open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||||
guard let molecule = boxes?[indexPath.row],
|
guard let molecule = boxes?[indexPath.row],
|
||||||
|
|||||||
@ -276,7 +276,7 @@ import UIKit
|
|||||||
let fallbackImageName = customFallbackImage ?? MVMCoreUIUtility.localizedImageName("fallback")
|
let fallbackImageName = customFallbackImage ?? MVMCoreUIUtility.localizedImageName("fallback")
|
||||||
if let format = format, format.lowercased().contains("gif") {
|
if let format = format, format.lowercased().contains("gif") {
|
||||||
// Gifs aren't supported by default and need special handling
|
// Gifs aren't supported by default and need special handling
|
||||||
MVMCoreCache.shared()?.getGif(imageName, useWidth: width != nil, widthForS7: width?.intValue ?? 0, useHeight: height != nil, heightForS7: height?.intValue ?? 0, format: format, localFallbackImageName: fallbackImageName, allowServerQueryParameters: allowServerParameters, localBundle: localBundle, completionHandler: finishedLoadingBlock)
|
MVMCoreCache.shared()?.getGif(imageName, useWidth: width != nil, widthForS7: width?.intValue ?? 0, useHeight: height != nil, heightForS7: height?.intValue ?? 0, format: format, localFallbackImageName: fallbackImageName, allowServerQueryParameters: allowServerParameters, completionHandler: finishedLoadingBlock)
|
||||||
} else {
|
} else {
|
||||||
MVMCoreCache.shared()?.getImage(imageName, useWidth: width != nil, widthForS7: width?.intValue ?? 0, useHeight: height != nil, heightForS7: height?.intValue ?? 0, format: format, localFallbackImageName: fallbackImageName, allowServerQueryParameters: allowServerParameters, localBundle: localBundle, completionHandler: finishedLoadingBlock)
|
MVMCoreCache.shared()?.getImage(imageName, useWidth: width != nil, widthForS7: width?.intValue ?? 0, useHeight: height != nil, heightForS7: height?.intValue ?? 0, format: format, localFallbackImageName: fallbackImageName, allowServerQueryParameters: allowServerParameters, localBundle: localBundle, completionHandler: finishedLoadingBlock)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user