• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Dillion/iOS-Flip-Transform: Core Animation framework for navigating data by flip ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

Dillion/iOS-Flip-Transform

开源软件地址:

https://github.com/Dillion/iOS-Flip-Transform

开源编程语言:

Objective-C 100.0%

开源软件介绍:

##iOS-Flip-Transform

###Summary Animation component for the effect of flipping as in a news/clock ticker, or a page turn.

Structured around the idea of a data object (i.e. headline in news, number in a clock, page in a book) as an animation frame, comprised of multiple CALayers.

Supports 3 interaction modes:

  • Triggered: as in a tap to flip
  • Auto: as in a revolving flip that loops through data
  • Controlled: as in a pan gesture that moves the flip layer according to touch

Supports different types of content:

  • Blank, with background color
  • With image, whether from file or screenshot
  • With dynamic text, either composited on background or on image

--

###Usage

  1. Create delegate object -
    AnimationDelegate *animationDelegate = [[AnimationDelegate alloc] initWithSequenceType: directionType:];

  2. Create flip view (either vertical or horizontal flip animation type) and assign it to animation delegate -
    FlipView *flipView = [[FlipView alloc] initWithAnimationType: animationDelegate: frame:];
    animationDelegate.transformView = flipView;

  3. Add flip view as subview and customize properties (refer below for configurable list)

  4. Call [flipView printText: usingImage: backgroundColor: textColor:] to draw each frame (minimum of 2)

  5. Call [animationDelegate startAnimation:] to start the animation. For using buttons or pan gesture, look at the animation controller example

Note: To remove jagged edges during flipping, set Renders with edge antialiasing in the project plist to YES. This may decrease performance.

####Configurable Properties

#####Animation Delegate

  • repeatDelay: Length of time to the next flip after the current flip completes (only for auto interaction mode)
  • shadow: Whether or not to display shadow
  • repeat: Whether or not to loop through animation frames (only for auto interaction mode)
  • sensitivity: Positive modifier for input to animation response. Higher the sensitivity, greater the response. (only for controlled interaction mode)
  • gravity: Positive modifier for speed of movement to nearest resting state after input is removed. Higher the gravity, faster the speed. (only for controlled interaction mode)
  • perspectiveDepth: Positive value for adjusting the perspective. Lower the value, greater the illusion of depth.
  • nextDuration: duration of the next flip animation

#####FlipView

  • textInset: inset of text relative to the flip view, like border margin
  • textOffset: positioning of text relative to top left of the flip view
  • fontSize: font size
  • font: font string, can be custom or inbuilt, defaults to Helvetica
  • fontAlignment: left, center or right alignment
  • textTruncationMode: none, start, middle or end truncation
  • sublayerCornerRadius: corner radius to apply to each sub panel of the flip view

--

###Feature Backlog

  1. More flexible and readable way of rearranging layers
  2. Dynamically drawing layers only when they come into view
  3. More realistic and less expensive lighting (specular reflection would be cool)

###Contributors
xissburg

--

http://twitter.com/dilliontan




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap