switchviewcontroller who's sole responsibility is to change the views of the page.
mainmenucontroller this contains the code and xib of a main menu view.
What I have is a UIButton in mainmenucontroller, which when pressed loads a mapcontroller view. In switchviewcontroller I have an IBAction to load and unload the views. How can I make it so that the mainmenucontroller can access this IBAction as at the moment it doesn't show. If I try changing it's class to switchviewcontroller, the IBAction shows and I can connect it to the UIButton but it crashes with unrecognized selector sent to instance.
I don't understand..why don't you just set up an IBAction in the main menu to do the same thing?
Okay I've done that and it now loads the new page, but leaves some elements on the page (labels, UIImageviews, buttons). How can I get rid of these? I thought doing:
I think it does just add it on top of the rest of the stuff because when viewing system resources, when I clicked on the UIButton the memory usage went up. Obviously this isn't the best way of doing it as eventually there will be lots of layers on top of each other right? So how can I clear the labels as well.