Browse Source

added visual feedback on cell taps

nayooti 5 years ago
parent
commit
8ada296a90

+ 1 - 0
deltachat-ios/Controller/GalleryViewController.swift

@@ -33,6 +33,7 @@ class GalleryViewController: UIViewController {
         )
         )
         collection.contentInset = UIEdgeInsets(top: 0, left: gridInsets, bottom: 0, right: gridInsets)
         collection.contentInset = UIEdgeInsets(top: 0, left: gridInsets, bottom: 0, right: gridInsets)
         collection.backgroundColor = .white
         collection.backgroundColor = .white
+        collection.delaysContentTouches = false
         return collection
         return collection
     }()
     }()
 
 

+ 7 - 0
deltachat-ios/View/Cell/GalleryCell.swift

@@ -35,4 +35,11 @@ class GalleryCell: UICollectionViewCell {
         }
         }
         imageView.image = image
         imageView.image = image
     }
     }
+
+    override var isSelected: Bool {
+        willSet {
+            contentView.backgroundColor = newValue ? DcColors.primary : .white
+            imageView.alpha = newValue ? 0.75 : 1.0
+        }
+    }
 }
 }