Various fixes

This commit is contained in:
Ilya Laktyushin
2020-02-12 02:47:38 +04:00
parent 606076c877
commit 8c209b78bd
7 changed files with 47 additions and 24 deletions

View File

@@ -91,12 +91,12 @@ open class ZoomableContentGalleryItemNode: GalleryItemNode, UIScrollViewDelegate
tapRecognizer.highlight = { [weak self] location in
if let strongSelf = self {
let transition: ContainedViewLayoutTransition = .animated(duration: 0.07, curve: .easeInOut)
if let location = location, location.x < 44.0 {
if let location = location, location.x < 44.0 && strongSelf.canGoToPreviousItem() {
transition.updateAlpha(node: strongSelf.leftFadeNode, alpha: 1.0)
} else {
transition.updateAlpha(node: strongSelf.leftFadeNode, alpha: 0.0)
}
if let location = location, location.x > strongSelf.frame.width - 44.0 {
if let location = location, location.x > strongSelf.frame.width - 44.0 && strongSelf.canGoToNextItem() {
transition.updateAlpha(node: strongSelf.rightFadeNode, alpha: 1.0)
} else {
transition.updateAlpha(node: strongSelf.rightFadeNode, alpha: 0.0)