animate my CGpointMake

Discussion in 'iOS Programming' started by jjgraz, Sep 29, 2009.

  1. jjgraz macrumors regular

    jjgraz

    Joined:
    Feb 13, 2009
    #1
    So I have an image moving across the screen.

    I can use something like:

    Code:
    [self moveImage:aViewa duration:4.0 
    			 curve:UIViewAnimationCurveLinear x: 20.0 y:00.0];
    
    However, I would like to get image current location, and animate it to next position. So I have something like:

    Code:
    CGPoint oldPosition = aViewa.center;
    	aViewa.center = CGPointMake(oldPosition.x - 20, oldPosition.y);	
    
    
    This does the job, but doesn't animate the move.....It just jumps to new location. How would I integrate the animation so it slides over as it did before?

    Thank you very much.
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
  3. jjgraz thread starter macrumors regular

    jjgraz

    Joined:
    Feb 13, 2009
    #3
    thank you. It works great!! I think I just needed someone to kick start my brain this morning.
     

Share This Page