iOS实现地图半翻页效果--老代码备用参考
2015-10-13 20:19
609 查看
// Curl the image up or down
CATransition *animation = [CATransition animation];
[animation setDuration:0.35];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
if (!curled){
//animation.type = @"mapCurl";
animation.type = @"pageCurl";
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.5;
} else {
//animation.type = @"mapUnCurl";
animation.type = @"pageUnCurl";
animation.fillMode = kCAFillModeBackwards;
animation.startProgress = 0.5;
}
[animation setRemovedOnCompletion:NO];
[self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
[self.view.layer addAnimation:animation forKey :@"pageCurlAnimation"];
// Disable user interaction where necessary
if (!curled) {
} else {
}
curled = !curled;
// Do any additional setup after loading the view, typically from a nib.
CATransition *animation = [CATransition animation];
[animation setDuration:0.35];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
if (!curled){
//animation.type = @"mapCurl";
animation.type = @"pageCurl";
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.5;
} else {
//animation.type = @"mapUnCurl";
animation.type = @"pageUnCurl";
animation.fillMode = kCAFillModeBackwards;
animation.startProgress = 0.5;
}
[animation setRemovedOnCompletion:NO];
[self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
[self.view.layer addAnimation:animation forKey :@"pageCurlAnimation"];
// Disable user interaction where necessary
if (!curled) {
} else {
}
curled = !curled;
// Do any additional setup after loading the view, typically from a nib.
相关文章推荐
- IOS导航控制器的手势滑动后退
- iOS多线程之GCD
- ios 关于AleartView 自动取消的问题
- ios音频视频资料--备用
- iOS隐藏导航栏或返回按钮
- iOS-跨界面传值和跨应用传值
- ios coredata 老代码备用参考
- iOS 内存管理机制
- ios 贝塞尔画图
- iOS常用设计模式
- iOS9适配
- ios开发系列之系统通讯录的相关操作
- 给iOS开发新手送点福利,简述文本属性Attributes的用法
- ios开发系列之中文转拼音,去声调,首字母转大写
- iOS多线程编码之NSThread的使用
- iOS7下Cell高度自适应
- iOS之OC随笔-@class与#import,#include的用法区分
- iOS 中textfield只允许输入字母和数字,限制长度
- iOS中 读取相册,调用系统相机 技术分享
- iOS中 读取相册,调用系统相机 技术分享