marinofaggiana 3 years ago
parent
commit
4056269a8e
1 changed files with 9 additions and 1 deletions
  1. 9 1
      iOSClient/Main/Collection Common/NCGridCell.swift

+ 9 - 1
iOSClient/Main/Collection Common/NCGridCell.swift

@@ -131,9 +131,17 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
     
     func selected(_ status: Bool) {
         if status {
+            if traitCollection.userInterfaceStyle == .dark {
+                imageVisualEffect.effect = UIBlurEffect(style: .dark)
+                imageVisualEffect.backgroundColor = .black
+                imageVisualEffect.alpha = 0.4
+            } else {
+                imageVisualEffect.effect = UIBlurEffect(style: .extraLight)
+                imageVisualEffect.backgroundColor = .lightGray
+                imageVisualEffect.alpha = 0.4
+            }
             imageSelect.image = NCBrandColor.cacheImages.checkedYes
             imageVisualEffect.isHidden = false
-            imageVisualEffect.alpha = 0.4
         } else {
             imageSelect.isHidden = true
             imageVisualEffect.isHidden = true