Hi. In short I would like to call a method from a viewSwitchManager class that contains a method which would switch the current view on display to a different view.
-(void)replaceView:(UIView*)oldSubView withView:(UIView*)newSubView;
I am trying to implement the following:
In my project I have 10 views they all have their own .m and .h files. Lets represent each view with number from 1 - 10.
Each view simply contains 9 buttons that would allow the user to click a button and then the app would take the user to the specified view depending on the button clicked.
Example:
So lets say the current view being displayed is: view1. on view1 there are 9 buttons being displayed which each correspond to a different view in the app.
[2] [3] [4] [5] [6] [7] [8] [9] [10]
NOTE: button1 is missing as that responds to view1 which is the current view so button1 is not needed on this view.
Action: The user clicks on button 6. a method would get called from a separate class called viewSwitchManager would replace view1 the current view, with view6 the new view.
the new view which would be view6 would then display again, buttons that correspont to a different view in the app like so:
[1] [2] [3] [4] [5] [7] [8] [9] [10]
NOTE: button6 is missing as that responds to view6 which is the current view so button6 is not needed on this view.
This is what i am trying to achieve. Ive tried different things but i keep getting errors. At one point even a SIGBART error. I've had problems with sending views as parameters, problems with obtaining the current view and replacing it with a new view and so on. I've thought about having a navigation controller but having looked at that looks like a daunting experience and i really dont want to drill down into different layers. Just a simple one in one out view system would be great. lol
Can someone please help me as this has taken up a lot of time! Because this problem took most of my time I've even had to repurchase the license just to buy more time which is quite funny.
Any help will be MUCH appreciated. Thank you in advance.