Fix color and incorrect offset

This commit is contained in:
Niels Andriesse 2021-02-25 13:27:20 +11:00
parent 37d0fa6723
commit 50b6862815
2 changed files with 4 additions and 4 deletions

View file

@ -57,7 +57,7 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
collectionView.register(PhotoGridViewCell.self, forCellWithReuseIdentifier: PhotoGridViewCell.reuseIdentifier)
// ensure images at the end of the list can be scrolled above the bottom buttons
let bottomButtonInset = -1 * SendMediaNavigationController.bottomButtonsCenterOffset + SendMediaNavigationController.bottomButtonWidth / 2
let bottomButtonInset = -1 * SendMediaNavigationController.bottomButtonsCenterOffset + SendMediaNavigationController.bottomButtonWidth / 2 + 16
collectionView.contentInset.bottom = bottomButtonInset + 16
view.backgroundColor = .white
@ -253,9 +253,9 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
}
// MARK:
var lastPageYOffset: CGFloat {
var yOffset = collectionView.contentSize.height - collectionView.frame.height + collectionView.contentInset.bottom
var yOffset = collectionView.contentSize.height - collectionView.bounds.height + collectionView.adjustedContentInset.bottom
if #available(iOS 11.0, *) {
yOffset += view.safeAreaInsets.bottom
}

View file

@ -61,7 +61,7 @@ class AttachmentApprovalInputAccessoryView: UIView {
// Use a background view that extends below the keyboard to avoid animation glitches.
let backgroundView = UIView()
backgroundView.backgroundColor = isLightMode ? UIColor.black.withAlphaComponent(0.2) : UIColor.black.withAlphaComponent(0.6)
backgroundView.backgroundColor = UIColor.black.withAlphaComponent(0.6)
addSubview(backgroundView)
backgroundView.autoPinEdgesToSuperviewEdges()