[iPhone] Switch UIViews

Hi.
I just have a pretty basic question actually: How do I switch between views on the iPhone?
I don't want to use a tab bar controller or navigation controller. Tapping a button on one screen (view) should bring the user to another screen. Possibly I want to have a nice transition animation, like a flip or a sliding animation.
Right now I'm just adding multiple views to the window and I just view / hide them according to what I want to show. It seems to be ineffective. I would much rather have a stack or something, so that only views that are currently displayed are loaded into memory. Also, I don't want to worry about hiding views that are not shown. Something like switchToView:viewXYZ would be much rather preferred. Is that even possible. Maybe with a view controller? There must be a way, right? I don't thing I'm supposed to just hide / show views.
Thank you very much!
Florian

Interesting.. I have been using the UIView animation for changing views, but had not figured out yet how to push a view right or left.. however, when I try this, it does not work as expected. The push works, but the new view also "fades" in while pushing.. instead of a clean push.. any thoughts?
Here is the code...
CATransition* trans = [CATransition animation];
[trans setType:kCATransitionPush];
[trans setDuration:0.5];
[trans setSubtype:kCATransitionFromBottom];
... code to change the view...
CALayer *layer = rootViewController.view.layer;
[layer addAnimation:trans forKey:@"Transition"];
also tried :
[trans setType:kCATransitionMoveIn];
I have only tried this on the simulator.. I guess I should try it on the device. as I have noticed other animations do not display properly on the simulator (for example, CurlUp does a dissolve... in the sim but works on the device..) I will update when I test it.
thanks!
michael golden

Similar Messages

  • My iphone 5 screen has gone black in the middle of updating a app. i have tried to back it up using itunes and restore it however it will not restore my phone as i have got the app find my iphone switched on. i cannot turn it off as the screen is black

    my iphone 5 screen has gone black in the middle of updating a app. i have tried to back it up using itunes and restore it however it will not restore my phone as i have got the app find my iphone switched on. i cannot turn it off as the screen is black. can anyone help me please??

    christobell86 wrote:
    ... it will not restore my phone as i have got the app find my iphone switched on.
    You can access iCloud.com on a computer to turn it off.
    http://support.apple.com/kb/PH2702

  • What may be the reasons for my iphone switching off all of a sudden and how do i prevent it?

    what may be the reasons for my iphone switching off all of a sudden and how do i prevent it?

    With the home page on display, in the menus select View, then Zoom and then Reset
    For details on the zoom features see [[page zoom]] and [[text zoom]]

  • My iphone switched off and when I turn it back on it wants to connect to itunes

    My iphone switched off and when I turn it back on it wants to connect to itunes
    I was taing photo's and battery was half full - I switched it off and when I turned it on it says connect to itunes. I am not near my laptop?! What can I do

    That is referred to recovery mode. At this point your only option is to restore to factory & then from a backup if you have one

  • HT1386 Since 8th May , I am not able to synchronize my iPhone with iTunes. Have tried removing previous back up data , removed all photos and videos on iPhone , switched  on and of and  reset iPhone  a million times , restarted my Mac a thousand times :(

    Since 8th May , after updating the iphone software to 5.1.1  I am not able to synchronize my iPhone with iTunes. Have tried removing previous back up datas , removed all photos and videos on iPhone , switched  on and of and  reset iPhone  a million times , restarted my Mac a thousand times Please Help !!!

    I have tried both options .. back up on this computer and also back up on icloud.
    The backingup is fine .. there is no problem .. even synchronizing songs , applications , calender , mail accounts is fine .. only the contacs are not synchronizing. The itune goes on and on .. showing synchronizing contacs .. but nothing happens. When i uncheck contacts synchronisation .. everything works fine . I have also reorganized my address book . but it does not help

  • My iphone switches off and reboots every 30 seconds

    My iPhone switches off and reboots every 30 seconds, has antone experienced this problem? It happened a couple of weeks ago and I took the sim card out , cleaned it and put it back. This solved the problem for about 2 weeks, but it doesnt help now

    Well Solution 1 : Reset your modem and Restore your Iphone 4 as a new iphone and try and it still keeps you off
    try with another modem and it still keeps you off then your wireless adaptor might crash and you need to go to apple store

  • Why my iphone switched off suddenly and doesnt turn on?

    why my iphone switched off suddenly and doesnt turn on?

    See Here for
    Frozen or unresponsive iPhone
    Try this First... You will not lose any Data...
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...
    http://support.apple.com/kb/ht1430

  • How to find my iPhone switched off

    Pls show me the way to find my iPhone switched off.

    If you mean the Phone itself has been turn off, ther eis no way to do that other than simply looking for it. If it is off, it cannot connect to the network.

  • My iphone switch off with out bactory.but its not switch on now i charged it arround 1 hr

    my iphone switch off with out bactory.but its not switch on now i charged it arround 1 hr.pls help me for that

    Have you tried a reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds, after which the Apple logo will hopefully appear.

  • HT1386 My iPhone switched off and cannot switch it on

    I just update the OS and my iPhone switched off and cannot switch it on

    Hold the sleep/wake and home button together until you see the Apple logo and then release. The phone should reboot. This can take up to 30 seconds worth of holding.

  • My iphone switched over to my moms phone and my number and all my contacts picture..etc is gone..how do i get it back?

    I plugged my iphone into itunes for the first time today, and when i did it asked me if i wanted to start a new account or use an existing one and since i already have an account for my ipod i clicked existing one. However as soon as it did that it started backing up to my moms iphone so i attempted to stop it and ended up just unplugging it from my computer. As soon as i did that the screen turned to the black screen with the apple on it. When i turned it back on my phone had switched to my moms phone. All my texts contacts and pictures were gone...her number is now under 2 phones..mine and hers. My number is compltely non-existant at the moment and i have no idea how to get all my stuff back. Please help me!

    Reinstall iTunes application.
    Copy /Music/iTones/ folder from your backup you made before you wiped the computer, to /Music/ then open iTunes.

  • Password protect the iPhone switching off button, please!

    This would make it easier to track the phone in case stolen, And also have the time to remotely remove data in time, before it goes out of reach who knows where and what purpose?
    I understand the phone would eventually switch off when no juice on battery, but I hope Apple engineers would code this feature as it would make it harder time for criminals.
    My friends phone was stolen yesterday, and It was protected by a four digit code, and a bundle 24- months plan phone. So no one should be able to use it as a phone, or can this be overrided? Anyway, I wish Apple would make even more systems that would make it harder time for the criminals.

    My friends phone was stolen yesterday, and It was protected by a four digit code, and a bundle 24- months plan phone. So no one should be able to use it as a phone, or can this be overrided?
    Unless the four digit code is successfully guessed-at, the phone should be protected. Your friend should notify the carrier of the loss and hopefully get the plan transferred to a new iPhone.

  • Iphone switching between pod cast and Ipod shuffle

    Hello, I have an IPhone 3 G and while I am running at my gym it keeps switching between my IPod and my podcast player. I have checked my internet connections and it is fine. I know I am not hitting the shuffle buttoon because I turn the sceen saver off, after I have selected the Pod Cast music that I like. Is it the head phones or the IPhone?

    One thing that might help out.
    The button on the headphones does not have the ability to shuffle media files.
    One click to pause or play. two clicks to advance to the next track.
    Here is a link to the iphone user guide that might help out.
    Check out page 63 for shuffle and repeat features.
    http://manuals.info.apple.com/enUS/iPhone_UserGuide.pdf
    Hope this helps.

  • IPhone switches from play to pause randomly

    When playing music on the iPhone it will randomly switch from play to pause then back to play again on its own. It behaves like this randomly and the time before it switches back to play is equally random from 2 sec to 15 sec. This is annoying. Anyone else experience this or have any idea as to the cause? I have version 2.0.1. TIA

    One thing that might help out.
    When you notice the iphone going from play to pause, is it when you are using the earbuds that came with the iphone or are you using a different pair.
    The reason for this questions is if the earbuds become disconnected from the iphone it is supposed to pause. Or, is you squeeze the mic part way down the earbud cable it is supposed to pause.
    Try wiggling the headphone jack in the iphone to see if you can produce this issue.
    Also, try wiggling the cable around the mic on the cable to see if you can produce this issue.
    Hope this helps.

  • My iphone switchs itself off and won't switch on again

    Hey all, my iphone has taken to switching itself off and refusing to switch on again. If I leave it connected to my computer overnight it will usually start up again. What gives?

    Perform a Reset...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    If no joy...
    Connect to iTunes on the computer you usually Sync with and “ Restore “...
    http://support.apple.com/kb/HT1414
    If necessary Place the Device into Recovery mode...
    http://support.apple.com/kb/HT1808

Maybe you are looking for