Reputation: 163
I want to add a UIButton function to a struct within a supplementary swift file in xcode, but whenever I hold the command button and drag the button to the swift code, nothing appears. I'm very new to xcode so any help explaining how I may deal with this would be greatly appreciated.
Do i have to declare a class first or something?
Thank you
Upvotes: 0
Views: 118
Reputation: 89192
You need to start with a class that inherits from UIViewController.
Upvotes: 1