Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Xcode 16 build issue #778

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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