views:

46

answers:

1

hi to all i have 2 toolbar one at top and another at bottom in between of these two i have a webview and i apply a turn page animation on it. But my problem is that on Animation both tool bar are also move with them how can i stop toolbar animation.only webview is animated

Thanks

[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1];//0.3]; [UIView setAnimationDelegate:self]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:NO];

+1  A: 

From your description, I think you are applying the animation on your main view (which contains the toolbars and the web view) and not on the web view only.

Post some code that might make things clearer.

EDIT:

Like i said you have applied the animation to your main view 'self.view' instead of your web view and hence the entire view is being animated..

[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:NO];

instead try applying it to your web view:

[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.myWebView cache:NO];
lukya
here is my code[UIView beginAnimations:nil context:NULL];[UIView setAnimationDuration:1];//0.3];[UIView setAnimationDelegate:self];[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:NO];due to this the top and bottom toolbar is also animated
a111
Never add the code in the comment, its not very clear. Edit your question and add the code there.. But like i said you have applied the animation to your view.. i have edited my answer..
lukya
Thanks but my web view is transparent and on animation is not look good.
a111
well that is a different problem then.. try setting some background color which might look good.. (i'm not sure whether web view shows a background color although its a UIView subclass).. or try using another view of exact same size and put your web view inside this view.. and animate that view..
lukya
thanks a lot.....
a111