fix(iOS): fix lock overlay ZStack order — icon now above overlay, unlock shows toolbar

This commit is contained in:
yumoqing 2026-07-02 22:20:26 +08:00
parent 01116180d1
commit d519e9aa17

View File

@ -454,8 +454,13 @@ struct PlayerContentView: View {
lastInteraction = Date()
if isLocked {
isLocked = false
withAnimation(.easeInOut(duration: 0.25)) {
showToolbar = true
}
resetHideTimer()
} else {
isLocked = true
showToolbar = false
}
#else
withAnimation(.easeInOut(duration: 0.25)) {
@ -466,6 +471,19 @@ struct PlayerContentView: View {
}
)
// iOS
#if os(iOS)
if isLocked {
Color.black.opacity(0.01)
.ignoresSafeArea()
.allowsHitTesting(true)
.contentShape(Rectangle())
.onTapGesture {
//
}
}
#endif
// 30
VStack {
Spacer()
@ -489,19 +507,6 @@ struct PlayerContentView: View {
.transition(.move(edge: .bottom).combined(with: .opacity))
}
}
// iOS
#if os(iOS)
if isLocked {
Color.black.opacity(0.01)
.ignoresSafeArea()
.allowsHitTesting(true)
.contentShape(Rectangle())
.onTapGesture {
//
}
}
#endif
}
.onAppear {
#if os(macOS)