Answers for "swift button action"

0

swift button action

//The action here in this case would be what you want the button to do

Button(action: {
  	number += 1
}, label: {
  	Text("Hello")
}
       
//The action here would be to increment number by 1
       
Button {
  	number += 44
} label: {
  	Text("Increase by 44")
}
       
//The action here would be to increment number by 44
       
//For more info about Buttons please go here
https://developer.apple.com/documentation/swiftui/button
Posted by: Guest on August-13-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language