Search code examples
iosobjective-cxcodestoryboardxcode-storyboard

Why can't I create IBActions from storyboard


I have a storyboard view controller that inherits from a UINavigationController but for some reason can not create IBActions, only IBOutlets. I have changed the class of the view controller to fit my class that I'm trying to create the IBAction in. Why is this happening? Any help would be much appreciated. I have attached an image of the problem here: Imgur link


Solution

  • You can easily make IBAction's in the header file.

    //This is your header file
    @interface AppMain{
       //Outlets and others here   
    }
    
    //Actions, Voids, Properties and others here.
    

    Where you put the actions -

    -(IBAction)[Name of action];
    

    In the storyboard in the linker you can link up your Action to the button.