//
// TestAnimate.h
// animate
//
// Created by Nervecell on 11-1-1.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
typedef enum e_flip_dire
{
FLIP_TO_FONT = 1,//向前翻 从右往左
FLIP_TO_BACK = 2,//往回翻 从左往右
}FlipDire;
@protocol FlipViewDelegate<NSObject>
//向前或者向后翻页,然后翻向目标的view
-(UIView*)getTargetViewWhenFlipTo:(FlipDire)eFlipDire;
@end
@interface FlipView : UIView
{
id<FlipViewDelegate> flipDelegate;
@private
UIView *m_TargetView;//想要在翻完页之后显示的目标view
UIView *m_TopView;//位于最顶层的那个view
//UIScrollView
CALayer *m_LeftPage;//出在顶层左边的
CALayer *m_RightPage;//出现在顶层右边的
CALayer *m_LeftOverlay;//当右页翻向左边时的遮照物
CALayer *m_RightOverlay;//当左页翻向右边时的遮照物
CALayer *m_MidPage;//翻页时显示中间页面
CALayer *m_MidFontPage;//中间页的正面
CALayer *m_MidBackPage;//中间页的背面
CAGradientLayer *m_MidLeftShadow;//翻页时在中间左边显示的阴影效果
CAGradientLayer *m_MidRightShadow;//翻页时在中间右边显示的阴影效果
CGPoint m_StartPoint;
CGFloat m_AverRadian;//翻页时的进行手势跟踪的平均弧度
CGFloat m_FlipRadian;//已经翻过的角度
BOOL m_bMidPageInLeft;//中间页是否在左边
BOOL m_bFromLeft;//是否从左边开始翻页
NSArray *m_ImgCache;//
NSInteger m_nPageIdx;
BOOL m_bStartMove;
BOOL m_bTouchEnded;//点击是否完结,一个完成的流程应该是开始点击、移动、最后释放,中间如果由多点的话视为无效
}
@property (nonatomic, assign) id<FlipViewDelegate> flipDelegate;
@end
没有合适的资源?快使用搜索试试~ 我知道了~
iphone下翻页效果的实例代码
共49个文件
pbxbtree:8个
m:7个
h:6个
需积分: 3 14 下载量 49 浏览量
2011-11-23
23:22:55
上传
评论 1
收藏 964KB ZIP 举报
温馨提示
类似书本翻页的效果,用coreAnimation实现的,主要是在层上面实现手势的动画效果。
资源推荐
资源详情
资源评论
收起资源包目录
animate.zip (49个子文件)
animate
animate.xcodeproj
project.pbxproj 17KB
Sun.mode1v3 41KB
Sun.pbxuser 30KB
Demo.png 9KB
main.m 357B
animate_Prefix.pch 183B
kitten2.jpg 35KB
.DS_Store 6KB
icon.png 11KB
animate-Info.plist 893B
flip.png 247KB
English.lproj
kitten1.jpg 30KB
Classes
animateAppDelegate.m 3KB
FlipTest.h 259B
Test2.h 193B
Test1.h 193B
FlipTest.m 1003B
FlipView.m 9KB
animateAppDelegate.h 323B
ImgUtils.m 1KB
Test2.m 791B
ImgUtils.h 390B
Test1.m 983B
FlipView.h 2KB
kitten3.jpg 30KB
MainWindow.xib 8KB
build
Release-iphoneos
Debug-iphonesimulator
Debug-iphoneos
.DS_Store 6KB
animate.build
Release-iphoneos
animate.build
animate.dep 7KB
build-state.dat 88KB
animate.pbxindex
subclasses.pbxbtree 2KB
categories.pbxbtree 1KB
symbols0.pbxsymbols 611KB
files.pbxbtree 3KB
protocols.pbxbtree 2KB
imports.pbxbtree 8KB
decls.pbxbtree 140KB
cdecls.pbxbtree 141KB
refs.pbxbtree 107KB
pbxindex.header 24B
strings.pbxstrings
control 256KB
strings 299KB
Debug-iphonesimulator
animate.build
animate.dep 7KB
animate~.dep 7KB
build-state.dat 74KB
build-state~.dat 74KB
Debug-iphoneos
animate.build
animate.dep 8KB
build-state.dat 71KB
Release-iphonesimulator
animate.build
animate.dep 4KB
build-state.dat 9KB
共 49 条
- 1
资源评论
animeng
- 粉丝: 196
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- tensorflow-2.7.3-cp39-cp39-manylinux2010-x86-64.whl
- tensorflow-2.7.2-cp39-cp39-manylinux2010-x86-64.whl
- Python版本快速排序源代码
- Python 语言版的快速排序算法实现
- 450815388207377安卓_base.apk
- 超微主板 X9DRE-TF+ bios 支持 nvme启动
- 基于Python通过下载气象数据和插值拟合离散数据曲线实现对寒潮过程的能量分析
- 健身房系统的设计与实现论文Java项目
- 使用TCP实现的搜索可用服务器
- 使用贪心算法解决会议时间安排问题的 Java 示例代码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功