0

i'm new to iOS Development. currently just want to produce Hello World Message.

However, after write update ViewController.swift code, i can't not drag or click any item on Controller Inspector's item

Below are Updated code of ViewController.swift :

@IBAction func showMessage(sender: UIButton) {

    let alert = UIAlertView(title: "My Hello Wolrd App", message: "Hello, World!", delegate: nil, cancelButtonTitle: "OK")

    alert.show()

}

Belo are screenshot of Connections Inspectors :

Connections Inspector

any idea to solve this ?

thanks in advance

questionasker
  • 2,536
  • 12
  • 55
  • 119

1 Answers1

0

You need to change Method signature like

@IBAction func showMessage(_ sender: UIButton) {

    let alert = UIAlertView(title: "My Hello Wolrd App", message: "Hello, World!", delegate: nil, cancelButtonTitle: "OK")

    alert.show()

}

After changing signature try to connect from storyboard
Hope it will help you.

Edit:-

enter image description here

jignesh Vadadoriya
  • 3,244
  • 3
  • 18
  • 29