Post

Replies

Boosts

Views

Activity

Reply to SwiftUI : tvOS, .contextMenu and .ButtonStyle not working together
I have found a solution to this issue struct MoviesBlankButtonStyle: PrimitiveButtonStyle {   @Environment(\.isFocused) var focused: Bool   @State private var isFocused: Bool = false       func makeBody(configuration: Configuration) -> some View {     configuration.label       .compositingGroup()       .padding(.all, 9)       .focusable(true, onFocusChange: { focused in         if focused {           isFocused = true         } else {           isFocused = false         }       })       .background(RoundedRectangle(cornerRadius: 20).fill(isFocused ? .red : .clear).opacity(0.7 ))       .foregroundColor(isFocused ? .white : .white)       .onTapGesture(perform: configuration.trigger)   } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’22
Reply to ITMS-90338: Non-public API usage-_CMTimebaseCreateWithMasterClock
same problem here too
Replies
Boosts
Views
Activity
Jul ’23
Reply to SwiftUI : tvOS, .contextMenu and .ButtonStyle not working together
I have found a solution to this issue struct MoviesBlankButtonStyle: PrimitiveButtonStyle {   @Environment(\.isFocused) var focused: Bool   @State private var isFocused: Bool = false       func makeBody(configuration: Configuration) -> some View {     configuration.label       .compositingGroup()       .padding(.all, 9)       .focusable(true, onFocusChange: { focused in         if focused {           isFocused = true         } else {           isFocused = false         }       })       .background(RoundedRectangle(cornerRadius: 20).fill(isFocused ? .red : .clear).opacity(0.7 ))       .foregroundColor(isFocused ? .white : .white)       .onTapGesture(perform: configuration.trigger)   } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to SwiftUI : tvOS, .contextMenu and .ButtonStyle not working together
Broken again in the released tvOS 16. I submitted feedback to apple.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to SwiftUI : tvOS, .contextMenu and .ButtonStyle not working together
Fur future reference, this has been fixed in tvOS 16 Beta 4.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22