conditional animation statement?

Discussion in 'iOS Programming' started by BollywooD, Dec 19, 2008.

  1. macrumors 6502

    Apr 27, 2005
    Surfers Paradise
    I am trying to create a set of if statements, depending on the initial position of 3 objects, will decide which position they all move to. (does that make sense?)
    Here is my code i am trying to implement it into:

    - (void)move {
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:1.0]; = Center1; = Center2; = Center3;
    [UIView commitAnimations];

    ive tried using:

    if ( == Center2) { = Center1; = Center3; = Center2
    else if ( = Center3) { = Center1 = Center2; = Center3;

    but i get the error
    "error: invalid operands to binary =="

    its probably really simple, but im stumped.
    can any one help.

    thanks in advance
  2. macrumors newbie

    Dec 20, 2008
    Check your else if there, is that the error you're talking about? it only has one = in the brackets.
    If your error is at the line with the if statement then check to make sure that Center2 is the same dataType as I guess

Share This Page