I have this project with two ViewControllers. It´s very simple. In the second window I only want a button to perform an action (link to iTunes store). I´m adding the code to my .h and .m files, but it´s not possible to link the actions to my button in the second window. But I can into the first one… I swear that I surfed and searched but I can´t find an answer to something like this. Should be easy, shouldn´t it? Thanx everybody!!
I have this project with two ViewControllers. It´s very simple. In the second window
Share
If you create an
IBActionin one ViewController, it will not be visible from the other. This is just the nature of ViewControllers. If you want to, you can make the second class inherit the methods and variables form the other. You can do this by replacingwith
in SecondViewController.h
(and if you get an error, add
#import "FirstViewController.h"at the very top of the class)