Determining Whether Current Animation Has Been Completed

For the iPhone, I want to combine two animations together but am crossing some problems. Basically, I want to hide and then show some outlets in one go. I can do this when they are separated into different events, but I when I combine them, the second round of animations (the show portion) takes precedence (when setAnimationBeginsFromCurrentState:FALSE). When it is setAnimationBeginsFromCurrentState:TRUE, nothing really happens at all.
Is there some way that I can have it wait till all the hiding stuff and then do the show stuff? I suppose this defeats the purpose of core animation's implicit purpose, so I guess I'm trying to go for a keyframe type of approach (I'm not sure. I'm pretty new to objective-c).
// The following chunk is set on awakeFromNib
zero = CGPointMake(250.0f, 524.0f);
bCenter01 = [button01 center];
bCenter02 = [button02 center];
//here are just the first two of my buttons that I wan't to animate, but imagine 14 more after this
// END awakeFromNib chunk
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// assume this is a button press
// HIDE portion
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:FALSE];
float time = 1.7;
CGAffineTransform rotate = CGAffineTransformMakeRotation(-M_PI);
[UIView setAnimationDuration:time];
[button01 setCenter:zero];
[button01 setTransform:rotate];
[button01 setAlpha:0.0];
time -= .1;
[UIView setAnimationDuration:time];
[button02 setCenter:zero];
[button02 setTransform:rotate];
[button02 setAlpha:0.0];
time -= .1;
// again, assume this is repeated 14 more times for the other buttons
// SHOW portion (this is basically where I want the animation to start after the HIDE has finished
// currently, when the button is pressed, the animation currently just starts from here (as it has "instantly" moved everything from the hide portion)
time = 0.2;
[UIView setAnimationDuration:time];
[button01 setTransform:rotate];
[button01 setCenter:bCenter01];
[button01 setAlpha:1.0];
time += .1;
[UIView setAnimationDuration:time];
[button02 setTransform:rotate];
[button02 setCenter:bCenter02];
[button02 setAlpha:1.0];
time += .1;
// again, assume 14 more...
[UIView commitAnimations];

I figured out how to do this. If anyone wants to know how to perform an animation after another one, this is what I did...
By the way, you don't have to declare the goPutThemBack in your header file.
- (IBAction)clear:(id)sender {
[UIView beginAnimations:nil context:NULL]
[button01 setCenter:offWindow];
// all your animations up here for the first part (let's assume this will hide something)
// now the magic to starting the second part
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(goPutThemBack:finished:context:)];
// end magic part
[UIView commitAnimations];
- (void)goPutThemBack:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
[UIView beginAnimations:nil context:NULL];
[button01 setCenter:onWindow];
// second set of animations
[UIView commitAnimations];

Similar Messages

  • Determining whether a window has been modified

    Is there a straightforward way of determining whether a window (say, TextEdit) has been modified since it was last opened? Maybe I'm missing something, but the answer doesn't seem to be in the properties of the window.

    Try properties of a document - applications such as TextEdit and Script Editor have a modified boolean if the document has been modified since the last save.

  • IR has been completly done on PO,but still has open items in MIRO.

    Hi MM experts,
    IR has been completly done on PO ,but still system allowing us to do  MIRO against PO.
    How it is possible.
    Current PO status:
    This is intercompnay PO (plant to plant stock transfer) not STO.  PO Qty is 60,000 KG, they have done GR partially quanties (many GR's). Delivery/PGI/GR/IR has been completed fully on PO.
    why SAP still allowing us to do MIRO against that PO? can any one tell me?
    Regards
    Suresh

    Or Check ME2L report ,filter on field "To be Invoice Qty " and "To Be Invoice Value , difference the post through MR11 if not required any further MIRO in the system.
    Thanks & Regards,
    Sandesh Sawant

  • How to determine which FileChooser ExtensionFilter has been selected

    Hi,
    I'm using a JavaFX fileChooser.showSaveDialog with two extension filters (*.csv and *.xml). How can I determine which filter was selected when the end-user clicks the save button?
    I am writing a program that allows the end-user to create an output file in CSV or XML format.
    If the end-user enters a file name with no extension, I need a way to determine if I should create a CSV or XML file. I would also like to add the proper extension to the file name if none is specified by the end-user. I want to do this based on which filter the end-user has selected. I wrote a Java program 5 years ago and I was able to do this with the following instruction:
    String extension = jFileChooser.getFileFilter().getDescription();
    I can't find a similar instruction for JavFX.
    My JavaFX Code:
    FileChooser fileChooser = new FileChooser();
    fileChooser.setInitialDirectory(new File(options.getOutputDirectory()));
    ExtensionFilter filter1 = new FileChooser.ExtensionFilter("Comma Delimited (*.csv)", "*.csv");
    fileChooser.getExtensionFilters().add(filter1);
    ExtensionFilter filter2 = new FileChooser.ExtensionFilter("XML Document (*.xml)", "*.xml");
    fileChooser.getExtensionFilters().add(filter2);
    File file = fileChooser.showSaveDialog(stage);
    String filename = file.getAbsolutePath();...How do I determine which extension filter has been selected?
    My Java Code:
    JFileChooser jFileChooser = new JFileChooser();
    jFileChooser.setCurrentDirectory(new File(outputDirectory));
    jFileChooser.setSelectedFile(new File(backupfile));
    FileFilter filter = new FileNameExtensionFilter("Comma Delimited (*.csv)", "csv");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setFileFilter(filter);
    filter = new FileNameExtensionFilter("XML Document (*.xml)", "xml");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setAcceptAllFileFilterUsed(false);
    jFileChooser.setDialogTitle("Export Alarms");
    jFileChooser.setBackground(colorFileChooser);
    int returnVal = jFileChooser.showDialog(jFrame, "Export");
    if (returnVal == JFileChooser.APPROVE_OPTION) {
        File file = jFileChooser.getSelectedFile();
        String filename = file.getAbsolutePath();
        String extension = jFileChooser.getFileFilter().getDescription();
        if (extension.equals("XML Document (*.xml)")) {
            if (!filename.endsWith(".xml") && !filename.endsWith(".XML")) {
                filename = filename + ".xml";
            saveTableXML(filename);
        else if (extension.equals("Comma Delimited (*.csv)")) {
            if (!filename.endsWith(".csv") && !filename.endsWith(".CSV")) {
                filename = filename + ".csv";
            saveTableCSV(filename);
    }Thanks,
    Barry
    Edited by: 907965 on May 13, 2012 1:14 PM
    Edited by: 907965 on May 13, 2012 1:15 PM
    Edited by: 907965 on May 13, 2012 1:19 PM

    This problem is currently tracked as http://javafx-jira.kenai.com/browse/RT-18836.

  • Notify an application user that an asynchronous call of a bi publisher report has been completed

    Hi experts,
    We have an ADF application (11g) from where we call BI Publisher (11g) reports by using bi publisher web services.
    I have the following 2 requirements:
    Run the reports asynchronously
    Notify each user that the report which has been asynchronously called has been completed.
    My thought was to use the scheduleReport web service which is asynchronous by default.
    My problem is how to notify only the specific user using "http notification" that the report is ready.
    http://docs.oracle.com/cd/E28280_01/bi.1111/e22259/reporttriggers.htm#BIPDV008
    Can you please help me on this?
    Regards,
    Dimitris

    I've converted the Blob to a Clob but still can't get it to appear in the BI Report. It shows up in the XML file as a bunch of text character, but in the report if I use the fo: instructions it remains blank, and if I don't, it shows the same text data that is in the XML file.
    Perhaps BI Reports aren't meant to show database images? Is there another tool I can use instead (data is in APEX 4.0) 11g.?

  • When i run Time Machine to back up my computer onto an external hard drive, i have no way of knowing when the back up process has been completed. I don't know when it is safe to disconnect the external hard drive - which is store in a separate location.

    When i run Time Machine to back up my computer on to an external hard drive, i have no way of knowing when the back up process has been completed.  This is necessary to know because i don't leave my external hard drive connected to the computer.  I routinely disconnect it after backing up the hard drive, and then i store the external hard drive in a different location from the computer.  So, knowing when the back up process has been completed would be a very helpful thing to have the computer specify. 

    Just enable Time Machine's menu extra (System Preferences -> Time Machine -> Show Time Machine in menu bar.
    This will add a little Time Machine icon to your menubar. When Time Machine is actively backing up your data, the icon will spin as a visual indicator. You can also click the menu icon to see the backup status, including how much data is left to back up.

  • I have an IPhone 5, and of course I have used ITunes. My Computer has been completely destroyed, so I have to Purchase a new one. How can I transfer my music from my iPhone to my New PC?

    I have an IPhone 5, and of course I have used ITunes. My Computer has been completely destroyed, so I have to Purchase a new one. How can I transfer my music from my iPhone to my New PC?

    The way I do it is I hook to my windows computer, it will pop up iTunes. I click iTunes off. The phone will show as another drive on your computer. Click it open then migrate to the photos folder from the iPhone.
    Then select all, cut then right click on your pictures folder on your computer or make a new folder on your desk top like I do and right click on new folder and select paste.
    Photos will be gone. Just remember to turn off the iPhone sync in your photos folder on the phone or they will come back
    Good Luck

  • Workflow Shows as 'In Progress' after Workflow has been completed.

    Hello All,
    I have created a custom workflow using SharePoint Designer. Within this workflow I have multiple 'approval process' tasks. In theory this was so that once the first user had approved the item then the next would be prompted to approve the item, and
    so on. The users that the item must be approved by are set when the item is submitted initially.
    Just so anyone reading this knows I have no formal experience/education in SharePoint workflow design, but I would like to think I know my way around SharePoint(in general) at this point.
    My problem is, the company I work for is just starting out using SharePoint workflows, and from what I understand workflows that are 'In Progress' are related to server performance. I noticed today that there are 5 items in the list which
    under the 'workflow status' column display that they are 'In Progress' which is entirely correct. However, when I go to -> 'List Settings' -> 'Workflow Settings' this workflow is showing 8 workflows 'In Progress'.
    Thank you to anyone who is able to help me with this,
    James

    Hi,
    According to your post, my understanding is that workflow shows as 'In Progress' after Workflow has been completed.
    To send the task one by one, you can select one at a time(serial) when you select Task Process Participants.
    Per my knowleadge, when you go to -> 'List Settings' -> 'Workflow Settings', it show all the workflows you associated to the list.
    To see the running workflow, you need to select an item, right click the title, and then select the workflow.
    However, each workflow enstance can only start once on an item.  In other word, you can not start the same workflow again untill the previous one is completed.
    As you said, workflow shows as 'In Progress'.
    Please make sure all the users have approved the tasks.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • I rented a movie in the iTunes Store but now when I want to watch it it says; 'cannot load the movie' while it says the download has been completed.. What now? I already payed for it.

    I rented a movie in the iTunes Store but now when I want to watch it it says; 'cannot load the movie' while it says the download has been completed.. What now? I already payed for it.

    Did you rent the movie on your iPad?  Are you trying to watch it on your iPad?
    Do you have WiFi connectivity when trying to start viewing the movie?
    You should have answered "yes" to all the above.  If not, that is probably the source of your issue.

  • Says download has been completed but nothing has popped up or changed?!

    I have just recently tried to download adobe photoshop 12 and in the installation it says that the download has been completed but nothing has appeared on the desktop or on the installation was wondering if anyone could help?? Please and thank you!

    Hi,
    Kindly post this query in Photoshop forum.
    Refer to this link:Photoshop General Discussion
    Regards,
    Florence

  • Heloo i was trying to open after effects that is just downloaded 10 min before...download has been completed ...but after effects is not opening..it is showing an error mesage

    heloo i was trying to open after effects that is just downloaded 10 min before...download has been completed ...but after effects is not opening..it is showing an error mesage

    And what error message? What system? What else? You need to be more specific.
    Mylenium

  • Maverick has been completing the update with less than one minute remaining now for well over an hour.  Where do I go from here?

    Maverick has been completing the update with less than one minute remaining now for well over an hour.  Where do I go from here?

    try this
    Reboot device by pressing both the home button and sleep/wake (power) buttons at the same time for 10-15 seconds until the apple logo appears on the screen, then let go.
    if that doesn't work then connect to a computer and try to open the device in itunes

  • How to check whether MRP run has been executed for a sales order or not

    Dear Experts,
    In Strategy:20, Make to Order scenario, I have run MRP for sales order in T Code:MD50,
    then how can I check whether MRP run has been executed for a sales order or not.  Is there any report where I can find some indication?
    Thanks and regards,
    Vikas

    Dear,
    In MTO scenario with Planning strategy group 20 in material master .
    After sales order is created, Run MRP , then planned order will be created then go to planned order details in MD04 or MD12 you will get sales order number in assigment tab.
    or check the Table PLAF field  PALTR ,and field name KDAUF its sales order, for all created planned order.
    Regards,
    R.Brahmankar

  • Customising the  "Action has been completed" page

    Does anyone know how to customise the page that is shown to a user when they go back to a completed activity?
    By default you have a white page with the info picture and the words " Action has been completed"
    I was wondering if anyone knows how to customise this completed page so that it shows something a bit nicer? (a static HTML page would be great to put in its place)
    We're on EP7 SP14 if that helps...

    Hi Danny,
    This can be achieved by using the "Callable Object for Display". if you are not aware there are two types of callable objects.
    1. Callable Objects for Execution (The one that we use mostly) - this callable object is called by the GP runtime when then user is executing the step.
    2. Callable Objects for Display - this callable object will be called when the execution for the step is already complete. And during later stage user comes back and clicks on some previous step.
    You can also check following link for more info
    [Re: Difference between Callable Object for execution and Display|Re: Difference between Callable Object for execution and Display]
    Another link
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4848c8d1-0c01-0010-33b9-87a6488c48a7|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4848c8d1-0c01-0010-33b9-87a6488c48a7]
    Hope this helps
    Regards,
    Ashutosh
    Edited by: Ashutosh Rastogi on Feb 21, 2008 5:42 PM

  • HT1725 My purchases are only playing halfway through the song then they jump to the next song even though the download has been completed "successfully". Does this mean an incomplete download? How do I rectify this? Please help

    My purchases are only playing halfway through the songs then they jump to the next song even though the download has been completed "successfully" Does this mean I have to repurchase and download again?

    Delete and redownload.
    You do not pay for redownloads.  Follow the direction:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

Maybe you are looking for

  • The operation could not be completed because an item with the name xyz already exists

    I am trying to make a click and drag backup on an external FAT 32 drive to compliment my Time Machine backup (long story) and I've done this each time by dragging my critical folders into the drive. I get a message asking me to stop, replace or skip,

  • Xorg Fails to Start: Could Not Open Default Font 'Fixed'

    After an absence from my Arch system, I tried to fire it up today and found that Xorg7 now fails to load, telling me that it "could not open default font 'fixed'". I have done a "find" on my whole partition - there is no font file called "fixed*" at

  • Align image left with css

    Hi, I have a simple question. I am using the following line in my css file to apply a background image to a canvas: Canvas { background-image: Embed("/images/Icons_Final/connected.png"); What would I do to align that image to the left of the canvas.

  • IPad Air (IOS 7.1) stuck in "Sign in to iCloud" loop

    iPad Air (IOS 7.1) continuously popping up the "Sign in to iCloud" window with an old Apple ID.  When cancelling, it simply pops up again, immediately.  And, because it is modal, I'm unable to get at Settings or anything else. Unfortunately this star

  • Replication of storage loaction issue from crm to ecc

    HI Experts , I am facing issue while store location replication from CRM to ECC. I have create field "Hub Location" using AET  on web  ui and behind that store  location search field is working . I have already created a Order . I have copied that or