Post

Replies

Boosts

Views

Activity

Reply to Blurred selected button on tvOS
I added the button style .glass but this does not change anything. Button styles .bordered, .plain.or .glassProminent produce a sharp selected button. Button styles .glass or .automatic to a blurred selection. struct ContentView: View { @State private var items = [ "Item 1", "Item 2", "Item 3", "Item 4"] var body: some View { ZStack { Image(systemName: "globe") .resizable() List(items, id: \.self) { item in Button(action: {}, label: { Text(item) }) .buttonStyle(.glass) } .padding() .glassEffect(in: Rectangle()) } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’25
Reply to Blurred selected button on tvOS
I added the button style .glass but this does not change anything. Button styles .bordered, .plain.or .glassProminent produce a sharp selected button. Button styles .glass or .automatic to a blurred selection. struct ContentView: View { @State private var items = [ "Item 1", "Item 2", "Item 3", "Item 4"] var body: some View { ZStack { Image(systemName: "globe") .resizable() List(items, id: \.self) { item in Button(action: {}, label: { Text(item) }) .buttonStyle(.glass) } .padding() .glassEffect(in: Rectangle()) } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Two `async let` do not run the calculation in parallel
I got this link from a Reddit user: https://twitter.com/rokhinip/status/1403375411732439044 So, now it is clear that the code should work as expected but it doesn't because I am still on Big Sur.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Two `async let` do not run the calculation in parallel
By the way, if I put longCalculation on a concurrent GCD queue than it works as expected. But I wonder if it is really meant to be like this.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’21