Wednesday, June 3, 2026
HomeiOS Developmentios - Swift Faucet vs Lengthy Press Buton

ios – Swift Faucet vs Lengthy Press Buton

[ad_1]

I’m new to swift, so thanks for all the assistance, I’m engaged on my first app and this works nice if my button is press it goes into the didTap operate.. However I have to do one thing else if its a LONG HOLD on the button… Being new to this I want some assist please…

ForEach(row, id: .self) { merchandise in
                            Button(motion: {
                                self.didTap(button: merchandise)
                            }, label: {
                                Textual content(merchandise.rawValue)
                                    .font(.system(dimension: 32))
                                    .body(
                                        width: self.buttonWidth(merchandise: merchandise),
                                        top: self.buttonHeight()
                                    )
                                    .background(merchandise.buttonColor)
                                    .foregroundColor(.white)
                                    .cornerRadius(self.buttonWidth(merchandise: merchandise)/2)
                            })
                        }

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments