2

I am developing an app in which i have a layer

layer1.frame=CGRectMake(80, 100, 180, 170);

If a user touch the screen the layer should be swiped out the the window through animation..

For this i am using a timer to animate but i don't know what to write in the timer function

to make it remove from the window(like swiped out)...

Please help...

4

1 に答える 1

0

Your touch イベントでは、次のコードを使用します。

[UIView transitionWithView:mysuperview duration:0.75 options:UIViewAnimationTransitionFlipFromRight animations:^{ [yourLayer removeFromSuperlayer]; } completion:nil]
于 2012-06-01T11:53:47.063 に答える