Giter VIP home page Giter VIP logo

jcflippageview's Introduction

JCFlipPageView

一个类似存折那样翻页的视图。

原来想直接修改 AFKPageFlipper( https://github.com/mtabini/AFKPageFlipper ) 实现这个效果,可是觉得里面不太符合要求,所以重写此视图。 感谢AFKPageFlipper提供了代码参考。

说明:

  • JCFlipPageView 主视图(类似UITableView)

  • JCFlipPage 加入到主视图里用来显示的页面。(类似UITableViewCell)

  • JCFlipViewAnimationHelper 实现卡片翻页动画效果。 具体原理为开始翻页动作时,在JCFlipPageView上加一个layer作为容器,同时获取当前页和下一页的截图。 以由上往下翻为例: 1、容器layer上半部分放下一页的上半部分,容器layer下半部分放当前页的下半部分。 2、然后再放一个只有半页大小的layer,用来显示翻页的动画。 3、翻页layer里放两个子layer,分别是上面下一页的下半部分,下面放当前页的上半部分。

  • 直接翻到某页时的动画效果已实现。

  • 添加翻页时页面阴影效果。即将被覆盖的页面越来越暗,即将被展开显示的页面越来越亮。(使用了SBTickerView的layer加阴影mask代码类 SBGradientOverlayLayer https://github.com/blommegard/SBTickerView 非常感谢)

未完成功能:

  • 直接翻到多页以后,比如从第一页翻到第十页,多页面翻动的效果未实现。

jcflippageview's People

Contributors

jimple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jcflippageview's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.