Skip to content

Commit

Permalink
Hidden subviews not taken in account in optimized snapshot type
Browse files Browse the repository at this point in the history
  • Loading branch information
ManueGE authored and Manuel G-Estañ committed Dec 18, 2018
1 parent d0a0ef8 commit dd9cd7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/HeroContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ extension HeroContext {
#else
if #available(iOS 9.0, *), let stackView = view as? UIStackView {
snapshot = stackView.slowSnapshotView()
} else if let imageView = view as? UIImageView, view.subviews.isEmpty {
} else if let imageView = view as? UIImageView, view.subviews.filter({!$0.isHidden}).isEmpty {
let contentView = UIImageView(image: imageView.image)
contentView.frame = imageView.bounds
contentView.contentMode = imageView.contentMode
Expand Down

0 comments on commit dd9cd7e

Please sign in to comment.