0

I am having issues with getting my code in xcode to work. following line of code is making issues.

@IBAction func yesbutton(_ sender: Any) {
        MainImage.image = UIImage(named:"timian")
    }

error preformed : @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { thraed 1: signal SIGABRT

can anyone tell me what is wrong with this ?

  • 1
    That's easy to fix. But we need more information. Where is MainImage beeing created? – Jonas Sep 18 '17 at 11:45
  • 1
    Your "MainImage" IBOutlet is disconnected. Please read the accepted answer in the duplicate link. (also note that properties in Swift should be written in lowercase, and if "MainImage" is an imageView it should not be named as if it were an image). Oh and open the Xcode's debug area to see the whole error message. – Eric Aya Sep 18 '17 at 11:46
  • hey so what I did was add mainimage as a image in the main.storyboard and then picked the image I wanted to use. – Julius Emil Peldrup Grønning Sep 18 '17 at 11:50

0 Answers0