Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikezang

macrumors 6502a
Original poster
May 22, 2010
859
9
Tokyo, Japan
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?
 

mikezang

macrumors 6502a
Original poster
May 22, 2010
859
9
Tokyo, Japan
check out this video http://www.youtube.com/watch?v=TasTwHPU9c8

Pay attention to the "move" button. If you want the animation without pushing a button, place the code in the viewDidLoad method.

Nick
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:)
 

nickculbertson

macrumors regular
Nov 19, 2010
226
0
Nashville, TN
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,
Nick
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.