-4

Screen2[][1] Screenshot

I don't understand why I have a fatal error. I'v posted a screenshot of my program declaration.

@IBOutlet weak var button: UIButton!

after

button.isEnabled = false

Thank you for your help

Tarik Hill
  • 63
  • 1
  • 6
  • 1
    Is the outlet connected? Try to disconnect and reconnect. – Kerberos Aug 27 '18 at 12:14
  • 1
    Can you add more details please? Like, did you create your viewController from a storyboard or programmatically? – Roux Aug 27 '18 at 12:15
  • Please change the title of your question to actually reflect the question you are asking or the problem or error you are facing. – takendarkk Aug 27 '18 at 12:29

2 Answers2

1

try changing the variable name

@IBOutlet weak var myButton: UIButton!

i need to search more as to why this happens but i think the button word is reserved so that is what causing the crash.

also when changing the variable name i recommend to disconnect and reconnect the outlet.

EDIT: nope that wasn't it but look at this screenshot and really verify that your outlet is connected

outlet

Arie Pinto
  • 1,239
  • 1
  • 11
  • 19
-3

Please remove the old outlet which you have connected earlier and Re-connect it again. Its seem like it is not connected properly or Xcode bug. Happy coding !