i work on a project and i have two buttons, one for sending a mail and the second one is an imagepicker.
I've able to link my first button to my @IBAction sendMail
but I can't do the same with my @IBAction imagePicker
.
When i do a "drag and drop" from the storyboard to the interface file my ViewController nothing happens. The blue strip is here but no window pop up to create the link..
A bit of help would appreciate. Here is the code :
internal class ViewController : UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
override internal func viewDidLoad()
@IBAction internal func
sendEmail(_ sender: any)
@IBAction internal func
imagePicker(_ sender: UIButton)
}
You may have already solved it, but the problem may originate because you are viewing the file interface instead of the file.
On your storyboard, touch the yellow circle of your ViewController.
Then touch the button with the 2 rings in the top right corner of the xCode:
Now change from automatic to manual:
Finally, find your ViewController without (interface) in the name and connect de action there.
If you did it all rigth, now you can see a white circle in the left of your action like this: