Iphone: How to make kCATransitionPush without any changes?

Possible duplicate:
iPhone CATransition adds fading to the beginning and end of any animation?

I want a push animation between two subviews, just like a ScrollView swap mode.

I know that I can use UIScrollView directly, but the logic there is not so similar to my program.

In any case, I can use the kCATransitionPush animation, but the bad thing is that it disappears when clicked.

I really hate this fading, can someone tell me how to remove this attenuation?

or how to make a UIScrollView-like swap fit between two subviews?

Many thanks.

+3
source share
1 answer

Just use regular UIView animations. You can use block-based animation, but I prefer the "traditional" style, since it works with 3.0:

CGRect pageFrame = currentPage.frame; CGFloat pageWidth = pageFrame.size.width; nextPage.frame = CGRectOffset(pageFrame,pageWidth,0); [UIView beginAnimations:nil context:NULL]; currentPage.frame = CGRectOffset(pageFrame,-pageWidth,0); nextPage.frame = pageFrame; [UIView commitAnimations]; 
+3
source

Source: https://habr.com/ru/post/885565/


All Articles