Flipping between screens

Hi everyone i need toknow about my flow of program whether its right or not.Like i have 2 screen A and B,now i need to flip between these 2 screen so what i am doin is that whenevr button in A screen is pressed i am add view of class B as a subview to class A that is

sender is a good habit to get into only becade of helps you remember that that var is a pointer to whatever triggered the message. Aside from that, you can call that var anything that you want. I simple name a lot of mine param, especially if I don't care what the method iis being passed.

Back on topic. What you put will look like it's working, but will really be failing, as you're creating a new instance if a view and placing it on top of the current. After multiple button presses, you're left with many of the same two views alternating in a stack. The views will keep stacking up until you run out of memory and the device reboots.

Thanks Skylar for help.And yes i did not think of that....Thanks for the help.But then do i need to have three viewController out of which the one will keep controlling and flipping and releasing so there wont be any memory issue?I guess that is the only way to do flipping.Thanks once again...

I'm pretty sure no one is helping you, or "giving you examples," because Xcode has a template for an app that does just what you want. It's called the "Utility App" template.

Basically, you need to create a root view controller and have it control the other two view controllers, including doing the actual flipping. If you simply open it up and look at it, you'll see how easy it is to do what you want.

and thanks for all your guidance.And i have been using Metronome example from apples site which is been using flipping but i wanted to know the way i am flipping screen is correct and if i can continue.Thanks a lot for helping me.

and thanks for all your guidance.And i have been using Metronome example from apples site which is been using flipping but i wanted to know the way i am flipping screen is correct and if i can continue.Thanks a lot for helping me.

Click to expand...

uhh no offense but i do not think kissing up to him like you're "not-straight" will get him to give you the code. he's right when he says the utility template flips how you want it.