Flip Animation Is Showing Next View BEFORE The Animation Starts

Hi All,
I am trying to do a flip animation, but the new subview is showing BEFORE the animation takes place rather than 1/2 way through the animation. It looks really bad. Can anyone see what I'm doing wrong... I've checked the elements application and mine looks pretty similar...
// setup the animation group
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
// [UIView setAnimationDidStopSelector:@selector(transitionDidStop:finished:context:)];
// flip views
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[questionCard removeFromSuperview];
[self.view addSubview:answerCard];
[UIView commitAnimations];
Thanks
Ray

Ok, I've stripped this down to it's bear bones and it's still not working. Here's what's left and when I swipe from right to left it displays the label and THEN animates...
// PlayGameController.h
// JapaneseMyWay
// Created by Ray on 4/22/09.
// Copyright 2009 _MyCompanyName_. All rights reserved.
#import <UIKit/UIKit.h>
#import "GuessingGameQuestionCard.h"
#import "GuessingGameAnswerCard.h"
// this controllers view contains the main area for playing the game. sub views for flash cards are shown.
@interface PlayGuessingGameController : UIViewController {
CGPoint gestureStartPoint;
UILabel *testLabel;
-(void)flipCard;
@end
// PlayGameController.m
// JapaneseMyWay
// Created by Ray on 4/22/09.
// Copyright 2009 _MyCompanyName_. All rights reserved.
#import "PlayGuessingGameController.h"
@implementation PlayGuessingGameController
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
// create a new view for this controller
self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
NSSet *myTouches = [event touchesForView:self.view];
UITouch *touch = [myTouches anyObject];
CGPoint point = [touch locationInView:self.view];
// save start point
gestureStartPoint = point;
-(void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event {
NSSet *myTouches = [event touchesForView:self.view];
UITouch *touch = [myTouches anyObject];
CGPoint point = [touch locationInView:self.view];
// if we swiped right to left
float minLength = 25.0f;
float maxVariance = 5.0f;
// did we swipe right to left?
if (gestureStartPoint.x-point.x > minLength && abs(gestureStartPoint.y-point.y) < maxVariance) {
// flip card
[self flipCard];
-(void)flipCard {
// setup the animation group
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75];
// flip views
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
testLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 240, 320)];
testLabel.text = @"test";
[self.view addSubview:testLabel];
[UIView commitAnimations];
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
// Release anything that's not essential, such as cached data
- (void)dealloc {
[super dealloc];
@end
Thanks
Ray

Similar Messages

  • HT1657 Can i get a refund for a rental i didn't view before the expiration date?

    Can i get a refund for a rental i didn't view before the expiration date?
    I wasn't able to tranfer the movie to the ipad, and couldn't view it on my pc.

    All purchases are considered final, but you can try contacting iTunes support and see if they will give you a refund or credit : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • My i phone 5c wont stop restarting!! sometimes it takes hours before the phone starts working again. Sometimes when it does this red lines go up and down the screen. Im so ready to go back to my 4s does anyone know how to fix this???

    my i phone 5c wont stop restarting!! sometimes it takes hours before the phone starts working again. Sometimes when it does this red lines go up and down the screen. Im so ready to go back to my 4s does anyone know how to fix this??? Should i mention i have tried restarting back to new and i have the most up to date software. Please help

    If the center portion of the monitor is flickering then your GPU on the logic is bad or (unlikely given this symptom) that your monitor cable is pinched/damaged.
    **Imediately backup ALL your important data while you can still see things on the monitor
    Contact Apple for appt. for in shop diagnostics for full examination and for parts replacement
    nobody can give you a cost on a repair that isnt fully diagnosed online and cannot be.
    perform SMC reset just to check:
    Shut down the computer.
    Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
    On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
    Release all the keys and the power button at the same time.
    Press the power button to turn on the computer. 

  • I iphone is showing an error 0xE800005 the logo starts turning in itself for hours. What should I do?

    i iphone is showing an error 0xE800005 the logo starts turning in itself for hours. What should I do?

    The page is just on my desktop and not on a server, so I'll post the code (sorry).
    Apparently Dreamweaver can't find the file:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Unable to load page</title>
    <style type="text/css">
    #container {
              width: 50%;
              margin: 3em auto;
              font-family: Verdana, Geneva, sans-serif;
    #dwicon {
              float: left;
              margin-right: 2em;
    #error {
              padding-top: .5em;
    #desc {
    </style>
    </head>
    <body>
    <div id="container"> <img id="dwicon" src="dw://configuration/Shared/ICE/Images/warning_icon.gif" width="32" height="32" alt="Warning" />
      <h3 id="error">Server Not Found</h3>
      <p id="desc">The page "http://localhost/iscroll.js" was not loaded because Dreamweaver could not find the server "localhost". Please make sure you are connected to the internet and the server name is correct.</p>
    </div>
    </body>
    </html>

  • After a time my computer starts flashing it is resolved by turning off Thunderbird. There is no link to how long before the flashing starts.

    After an unspecified time my computer starts flashing. I assumed it was a hardware problem but found that every time I switch off Thunderbird the flashing stops. If i turn it back on the flashing has stopped but eventually returns. There is no time link, it might be hours before the flashing starts. It is always resolved if I turn off Thunderbird. I have compacted folders, altered check for new email times. I cannot force the flashing to start.

    In System Preferences > Startup Disk, select your internal hard drive by clicking on it. The trouble you are seeing is because the Mac is looking for a network to start from and can't find one. Point it to your hard drive instead.

  • TS4006 is there a way to undo the "Erase" command before the deletion starts?

    is there a way to undo the "Erase" command before the deletion starts while the phone is turned off.  In my case the erase is pending the phone being turned on.  Now that I have found the phone, I don't want the deletion to happen.  How can I undo the command before turning on the iPhone?

    There's no way to block the remote wipe.  But once it's been wiped, you can perform a restore from your backup on either icloud or itunes.

  • RMBP: Sometimes, after having been shut down, i have to press the power button several times before the machine starts up. It's 3 weeks old, and this has happened 2 times now. Is there something wrong with my rMBP?

    rMBP: Sometimes, after having been shut down, i have to press the power button several times before the machine starts up. It's 3 weeks old, and this has happened 2 times now. Is there something wrong with my rMBP?

    Did you purchase the Mac new?
    You have 14 calendar days from the time your items are delivered to initiate a return as noted here.
    Even though you are past the 14 day limit, if it were me, I'd take the Mac back and explain what's going on. Your Mac should work out of the box.
    message edited by:  cs

  • Hi! I just joined the creative cloud. As a photographer I would like to download photoshop and lightroom. When I try to do this, before the download starts, I get the message: 'we are experiencing some problems, please try later'. I've tried multiple time

    Hi! I just joined the creative cloud. As a photographer I would like to download photoshop and lightroom. When I try to do this, before the download starts, I get the message: 'we are experiencing some problems, please try later'. I've tried multiple times for the last 3 days but no change... Any ideas?

    Michelmolder please try utilizing a different web browser.  If you continue to experience difficulties then I would recommend reviewing Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html for information on how to install Photoshop and Lightroom directly through the Creative Cloud Desktop application.

  • HT1583 When burning a DVD of photos and music from iDVD, the photos blur right before the transitions and the music has about 5 second glitches here and there before the music starts again. Is there any way to burn the DVD without this happening?

    Each year I am in charge of making a slideshow of photos and music for my annual company meeting. I always use iDVD to set up my photos and music and then burn the DVD to play at the meeting. Every time I burn the DVD, it blurs right before the transition of the photo. It has always done this and I'm not sure why. It will also make the music glitch in a few spots for about 5 seconds or more. If I burn another DVD to try it again, the glitches will still be there, but in different spots. I've tried the highest quality of DVD's possible and this still happens. What can I do to fix this problem?

    Try disabling transitions altogether!
    There is a technical reason that this breakup happens - it is to do with how slideshows can be saved within the DVD specification, they can either be recorded as 'video streams' or as a collection of 'still images'.
    When you add transitions iDVD has no option but to use a video stream, this can result in terrible 'breakup' because the mpeg 2 encoder isn't designed to handle scenes that are static with a sudden short change. You can see 'artefacts' in the video stream…
    https://en.wikipedia.org/wiki/Compression_artifact
    'Still image slideshows' avoid the issue altogether by only showing a static image, no video compression is used & because the scene doesn't transition so it shouldn't breakup.
    NOTE: Music on the slideshow is irrelevant, both types can use a soundtrack.
    I cannot remember if it is possible to force iDVD to only make still image slideshows, I always use DVD Studio Pro to correctly setup DVD's. I'd suggest you use the option to save the DVD to a disk image & then open that disk image so that DVD Player can preview it, that should save on the number of test disks you burn.
    If you cannot make it avoid using video streams you may be ether off making your own video slideshow in iMovie & then import that into iDVD. It may eventually look better despite being a video stream!
    iDVD isn't really condusive to professional levels of control.

  • Weird characters before the xml start tag on Host

    When we load xml generated in Biztalk into an OS/400 Host environment, they always have some weird characters before the declaration (<?xml) causing the host program to fail. The characters look like gibberish from another planet (not really..look like
    some binary encoding). Can one of the experts please point me to what must be changed?

    If you look at the message using a hex editor, the UTF-8 BOM (Byte Order Mark) is EF BB BF, if you are using Unicode, the BOM is FE FF or FF FE (depending on little or big Endian encoding).
    If you "Stop" your send port and run a test, you can view the suspended message body in hex and determine if these characters are a BOM.
    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

  • Loud beep sound when starting up my Mac book air (2007), right before the classic start-up noise

    There is a very loud beep right before the classic Mac start up "bong"
    I'm thinking there might be something wrong with the ram...
    Any answers? Thanks!

    Although it's an older article, for the most part it's applicable -
    http://support.apple.com/kb/HT2538
    The beep on startup is usually an indication of a failed RAM module. It's also possible that a recent firmware update on the machine was botched. If you didn't recently perform a firmware update then it's probably the RAM. As the RAM is soldered directly to the logic board it cannot be replaced individually, it'd require a full logic board replacement.
    Given the age of the machine, it's unlikely still covered by the AppleCare Protection Plan and definitely not the one year limited warranty.
    The next course of action would be to bring the machine into the Genius Bar or AASP and have them evaulate your repair options.

  • Actvities before the Project Start Date

    Every now & then, we will get an activity which is a precursor to a project kicking off as a project start date so in theory from that start date would be known as either week 1 or Month 1.
    So in this case, any actvivity starting a month for example before the kick off date should be shown in "- Month 1" but in Project 2013, it takes this new date as Month 1 even when the Project Start Date has not changed.
    The earlier versions of Project, you could manipulate this so what's changed?...Is there a way around this?
    I am not using Project server as will never use it to save myself from grief & stress!...prefer to keep it simple!

    I couldn't test it with 2013 but with 2010 the week numbering starts at the project start date, so you can have a project start date on a certain date which will be your week1, and then set predecessors with no impact on the numbering.
    If you confirm that this behavior jas changed with 2013 version, an option could be to enter as manually scheduled tasks with no dates the tasks prior to the project start date, using custom fields to enter the actual dates.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • How to show asterisk * effect once the user starts editing the document??

    I wrote a java text editor. I creat a new internal frame and allows to open a document.
    How to have an effect (an asterisk * follows the filename in title bar) once
    the user starts editing the document? And once I save that file, that asterisk * will
    disappear. It seems to me we need to add a listener, but not sure how to change
    the title bar of internal frame??

    just use DocumentListener like
    myTextArea.getDocument().addDocumentListener(new DocumentListenet(){
    public void changedUpdate(DocumentEvent e){
    frame.setTitle( frame.getTitle() + "*" );
    implements two other methods too

  • Preloader only fills 1/2 way before the video starts

    I am very new to Flash CS4, however I was able to create a preloader with help from a Dan Carr tutorial.
    Here is my source:
    import fl.video.*;
    import fl.controls.ProgressBarMode;
    // Set Variables
    var flvControl = display;
    var flvSource = "op.flv";
    // Create event handler functions to control the progressbar
    function progressHandler(event:VideoProgressEvent):void
       var bl = Math.round(event.bytesLoaded/1000);
       var bt = Math.round(event.bytesTotal/1000);
       // Update progress...
       pb.setProgress(bl,bt);
    function readyHandler(event:VideoEvent):void
       // Remove progressbar when we start playing...
       removeChild(pb);
    // Set progress bar state
    pb.mode = ProgressBarMode.MANUAL;
    pb.indeterminate = false;
    // Add listeners and load the video
    flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
    flvControl.addEventListener(VideoEvent.READY, readyHandler);
    flvControl.source = flvSource;
    Here is an example of the video:
    http://orthopreferred.us/test/ortho/op1.html
    The movie loads and plays but the preloader only loads part of the way. How would I go about having the preloader progress bar load all the way then have the movie start?
    Thanks!

    I have tried your code change and the progress bar still does not completely load. It goes just a bit the the video appears.
    I edited the fla to this (see bold):
    import fl.video.*;
    import fl.controls.ProgressBarMode;
    // Set Variables
    var flvControl = display;
    var flvSource = "op.flv";
    // Create event handler functions to control the progressbar
    function progressHandler(event:VideoProgressEvent):void
       var bl = Math.round(event.bytesLoaded/1000);
       var bt = Math.round(event.bytesTotal/1000);
       // Update progress...
       pb.setProgress(bl,bt);
    function readyHandler(event:VideoEvent):void
       // Remove progressbar when we start playing...
       removeChild(pb);
    // Set progress bar state
    pb.mode = ProgressBarMode.MANUAL;
    pb.indeterminate = false;
    // Add listeners and load the video
    flvControl.autoPlay=false;
    flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
    flvControl.addEventListener(VideoEvent.READY, readyHandler);
    flvControl.source = flvSource;
    flvControl.play();
    //end
    Progress bar barely moves then the movie appears and plays.
    See example:  http://orthopreferred.us/test/ortho/op1.html
    My fla can be downloaded here: http://orthopreferred.us/test/ortho/op1.fla

  • In address book, if I try to show first name before the last name, why do only a few names change?

    Using address book on 10.7.2, when I go to "preferences" to change the display order between showing the "first name" before or after the last name, only about 25% of names will change.  The rest all stay in the same order.   Any ideas? 

    By default any outgoing email has the addresses saved in the Collected address book. You can turn this option off if you want.

Maybe you are looking for

  • BDC for udm_dispute

    Hi Experts, I want to update the (customer dispute amount) FIN_CUSTDISP_AMT field in the transaction udm_dispute. However, when I press F1 on this field i don't get any thing under Screen field defined under Field Descrition for Batch Input .  Even w

  • OCI Catalogs in MM

    Hi Guys, as we all know since ECC6.0 we can use OCI catalogs in MM. I now have a vendor who send me his OCI interface data. I customized the data. Everything is fine. But I now have additions wishes: 1. Integration of multiple catalogs - only the def

  • Opendoc date range into Bex query

    We are having an issue when trying to pass a date range in an Opendoc link. The report is built off a BEx query,  within the report we have an Opendoc link into a child version of the report. I can pass all the other prompts with no issue except for

  • Punchout Product Category Default

    Hi everybody, I am trying to default (set in the extended attributes in PPOMA_BBP)the product category in punchout catalog when EBP does not have the vendor product category. I know this could be done in earlier versions of EBP. I am trying to do the

  • Images not loading while accessing portal from internet

    Hi all   we are trying to publish the portal on internet. We have used  apache as reverse proxy  and it is in dmz . When we access the portal from internet we are getting the  login page  but it is with out images (e.g branding imag etc). we also cou