fix(iOS): replace lock overlay with allowsHitTesting — icon now reliably unlocks
This commit is contained in:
parent
d519e9aa17
commit
58c34250c5
@ -398,6 +398,9 @@ struct PlayerContentView: View {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
#if os(iOS)
|
||||||
|
.allowsHitTesting(!isLocked)
|
||||||
|
#endif
|
||||||
.onTapGesture(count: 2) {
|
.onTapGesture(count: 2) {
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
recordInteraction()
|
recordInteraction()
|
||||||
@ -471,19 +474,6 @@ struct PlayerContentView: View {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// iOS 锁屏遮罩层(拦截触摸,置于图标下方)
|
|
||||||
#if os(iOS)
|
|
||||||
if isLocked {
|
|
||||||
Color.black.opacity(0.01)
|
|
||||||
.ignoresSafeArea()
|
|
||||||
.allowsHitTesting(true)
|
|
||||||
.contentShape(Rectangle())
|
|
||||||
.onTapGesture {
|
|
||||||
// 吞掉所有触摸
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 底部控制栏 — 半透明,30秒自动隐藏
|
// 底部控制栏 — 半透明,30秒自动隐藏
|
||||||
VStack {
|
VStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
@ -505,6 +495,9 @@ struct PlayerContentView: View {
|
|||||||
if hovering { resetHideTimer() }
|
if hovering { resetHideTimer() }
|
||||||
}
|
}
|
||||||
.transition(.move(edge: .bottom).combined(with: .opacity))
|
.transition(.move(edge: .bottom).combined(with: .opacity))
|
||||||
|
#if os(iOS)
|
||||||
|
.allowsHitTesting(!isLocked)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user