How to make the action of the UIBarButtonItem argumentless

Asked 2 years ago, Updated 2 years ago, 66 views

Usually, when DragAndDrop is performed from the Storyboard, the argument (sender:Any) is created.
I want to erase this and make it func without arguments.

ios xcode storyboard

2022-09-30 17:13

1 Answers

You can code func without arguments first

@IBAction funconXxxBarButtonDidTouch(){
  print("XxxBarButtonDidTouch!")
}


2022-09-30 17:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.