Apple's iBooks Dynamic Page Curl

来源:互联网 发布:作息时间表软件 编辑:程序博客网 时间:2024/05/18 01:36

http://blog.steventroughtonsmith.com/2010/02/apples-ibooks-dynamic-page-curl.html

A week ago at NSConference I decided to try and figure out how Apple performed the page curl animation shown in the iPad announcement keynote.

It ended up being pretty easy to implement, and the page curl code has been in the OS since the beginning (although it's currently a private class - I've filed a radar asking to open the API that you can dupe if you'd like. rdar://problem/7616859). Basically you have to add in the finger angle tracking code and figure out the basic physics to make it believable. My code is pretty rough but it gives you a basic idea of how to get this working.

Here's hoping it's opened up because if it's not, then the iBooks app (distributed through the App Store) will be provably using private APIs which doesn't help anyone.

Here's a sample project that you should be able to build and run which shows the effect in action; the samplecode currently works for iPhone 3.0 and above.

Download Sample Code

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 奶壶喂奶呛到了怎么办 宝宝喝奶瓶老是呛到怎么办 两个月宝宝睡偏头了怎么办 婴儿吐奶豆花状怎么办 吃母乳乳头破了怎么办 顺产后仰卧睡了怎么办 宝宝含着母乳睡怎么办 刚出生的孩子不吃母乳怎么办 月子里挤奶手痛怎么办 做完月子之后腿疼腰疼怎么办 腰疼引起的腿疼怎么办 上网上久了脑袋痛怎么办 莲花坐的脚麻怎么办 月子腿疼膝盖疼怎么办 做月子腿着凉了怎么办 出月子大腿根酸怎么办 出了月子腰酸痛怎么办 出了月子腿没劲怎么办 生完孩子后缺钙怎么办 生完孩子腿疼怎么办 生完孩子后腿疼怎么办 生完孩子肛门突出怎么办 生完孩子肋骨突出怎么办 蛙跳理蛙跳后腿疼怎么办 蛙跳两天后腿还疼怎么办 莲花菩提盘黑了怎么办 体育课蛙跳后肌肉拉伤怎么办 o型腿骨头弯了怎么办 小孩钢琴坐姿不对向后仰怎么办 小孩皮肤不好容易留疤怎么办 学游泳时站不稳怎么办 水呛到了不停打嗝怎么办 来月经前游泳了怎么办 快来完事游泳了怎么办 游泳时来月经了怎么办 经期第7天游泳了怎么办 来月经已经游了泳怎么办 月经来了要游泳怎么办 三个月宝宝趴着不会抬头怎么办 我的月经不完怎么办 游泳时怎么办能浮出水面