Hi,
Looking to get secondary tap sound in UI,
When in menus on visionOS there is a secondary sound that isn't a button sound when you tap on elements not - does anyone know how to add this sound (it's also in settings when you tap on any element? Currently I am generating a similar field as in the appstore settings but the onTapGesture doesn't make a system sound.
Thanks!
let title: String
let subtitle: String?
let action: (() -> Void)?
@State private var isHovered = false
init(title: String, subtitle: String? = nil, action: (() -> Void)? = nil) {
self.title = title
self.subtitle = subtitle
self.action = action
}
var body: some View {
HStack {
VStack(alignment: .leading, spacing: 2) {
Text(title)
.font(.body)
.foregroundColor(.primary)
if let subtitle = subtitle {
Text(subtitle)
.font(.caption)
.foregroundColor(.secondary)
}
}
Spacer()
Image(systemName: "chevron.right")
.font(.system(size: 12, weight: .medium))
.foregroundColor(.secondary)
}
.padding(.horizontal, 24)
.frame(height: 50.45)
.background(.black.opacity(0.3))
.onTapGesture {
action?()
}
.hoverEffect(.highlight)
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
I'm looking to build something similar to the header blur in the App Store and Apple TV app settings. Does anyone know the best way to achieve this so that when there is nothing behind the header it looks the same as the rest of the view background but when content goes underneath it has a blur effect. I've seen .scrollEdgeEffect on IOS26 is there something similar for visionOS?
Thanks!
Is it possible to add an ornament below a tab bar like this? Or does the whole side bar have to be an ornament to build this?