1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

How to animate a UIView like a curtain moving?

Discussion in 'iPhone/iPad Programming' started by mikezang, Feb 3, 2011.

  1. macrumors 6502a

    I know how to slide a UIView using CGAffineTransformTranslate(self.transform, x, y), but I want to the UIView moving like a curtain before window, what can I do?
  2. macrumors regular


  3. macrumors 6502a

    Thanks for you video. Little different for my requirement.
    I got it with code as below:

    curtain.transform = CGAffineTransformTranslate(curtai.transform, x, y);
    curtain.width = 10; // curtain.width = -x;

    By the way, can you tell me how to take the video:)
  4. macrumors regular


    Oh, that is what you meant by curtain. I thought you had a curtain image you wanted to move off the screen.

    That video is not mine. "brandflakeapps" is the youtube user's name. I think he uses screenflow for his videos but I use Quicktime - Screen Recording into iMovie.

    Glad you found a code that works,

Share This Page