I have a UIViewController based app and I want to changes data on view with animation (handle touchesbegan, touchesmove, touchesended
). All data I save in a base). For example, I have main screen, and when (touches ended)
handles, I want to show other view.
Whatever i will be to do, screens could be rotate (to right or to left, if position changes more then 1/2 of width View, but if labels count number more then count of rows in my table, I want to set state at image 2.
Could you see right way to do animations? For example, I could to create my own class or use app delegate, but I not sure from what I must to start.
Use UIView's transitionsWithView method:
[UIView transitionWithView:containerView
duration:0.2
options:UIViewAnimationOptionTransitionFlipFromLeft
animations:^{ [fromView removeFromSuperview]; [containerView addSubview:toView]; }
completion:NULL];
More details, including above example can be found here:
Tim
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.