I am building an iOS app and i have most of the code/GUI built (its a single view app). Now i have the .xib and controller.h file next to each other and I want to associate a button click with a certain action. Everytime I try nothing happens. The UI indictor that I am dragging shows up but it wont let me connect to the method. This happens for all the objects/methods.
I have an almost identical project that works just fine too!
Select your XIB file and then select "Files Owner" which is the yellow cube. In the Utilities Sidebar, select the Icon with the circle and arrow inside of it (which is the "Connections Inspector"). You can then Control + Drag your to your button.
//// Edit ////
After investigating your project... Pretty sure you deleted a storyboard and then added a .xib but didn't set it's class, or link it's view as an outlet.
To do that:
Select the new view (XIB), then selct the main view, and in the identity inspector, set it's class to your custom class name "AVYSViewController."
Switch to the connections inspector and Control + Drag the "view" outlet to the main view in your XIB.
Also, your project was looking for the MainStoryBoard.storyboard file. So get rid of that setting by selecting your project, then selecting your target, and in the "Summary" tab, delete anything in the "Main Storyboard" field.
Note: I checked to see if your project settings were valid before I deleted the storyboard setting and it returned NO errors, so beware of this problem for future projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With