ios – How can I take away Button opacity animation on faucet?


I hava a customized dropdown record and the highest merchandise is a button (as a result of .onTapGesture did not work with the gadgets I’ve within the title) for which I wish to take away the faucet impact (oppacity change of the textual content). Once I faucet on chosen Merchandise I want to be the identical as a easy Textual content, no faucet impact.
enter picture description right here

I attempted .animation(nil) and .buttonStyle(.plain) however with no luck.

                    Button(motion: {
                        isSelecting = !isSelecting
                    }) {
                        HStack {
                            Textual content(selectedItem?.title ?? "Choose Merchandise")
                                .animation(.none)
                            Spacer()
                            if gadgets.rely > 1 {
                                Picture(systemName: "chevron.down")
                            }
                            
                        }
                        .padding(.horizontal)
                    }
                    .buttonStyle(.plain)
                    .animation(nil)
                    .disabled(gadgets.rely < 2)
                    .onTapGesture {
                        isSelecting.toggle()
                    }

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles