Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions Sources/HeroContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,6 @@ extension HeroContext {

unhide(view: view)

// capture a snapshot without alpha, cornerRadius, or shadows
let oldMaskedCorners: CACornerMask = {
if #available(iOS 11, tvOS 11, *) {
return view.layer.maskedCorners
} else {
return []
}
}()
let oldCornerRadius = view.layer.cornerRadius
let oldAlpha = view.alpha
let oldShadowRadius = view.layer.shadowRadius
Expand Down Expand Up @@ -229,7 +221,12 @@ extension HeroContext {
}
#endif

if #available(iOS 11, tvOS 11, *) {
if #available(iOSApplicationExtension 11.0, tvOSApplicationExtension 11.0, iOS 11, tvOS 11, *) {
// capture a snapshot without alpha, cornerRadius, or shadows
let oldMaskedCorners: CACornerMask = {
return view.layer.maskedCorners
}()

view.layer.maskedCorners = oldMaskedCorners
}
view.layer.cornerRadius = oldCornerRadius
Expand Down