登录 立即注册
金钱:

Code4App-iOS开发-iOS 开源代码库-iOS代码实例搜索-iOS特效示例-iOS代码例子下载-Code4App.com

Hero

[复制链接]
来自: Torr 分类: iOS精品源码 上传时间: 2017-1-4 10:47:11
Tag:Transition 视图切换 Layout View Animation

项目介绍:

https://github.com/lkzhao/Hero

Supercharged transition engine for iOS. Build your custom view transitions with few lines of code or even no code at all. Inspired by Polymer's neon-animated-pages and Keynote's Magic Move.

iOS增压转换引擎。 使用几行代码或甚至没有代码构建您的自定义视图转换。 灵感来自Polymer的[neon-animated-pages](https://elements.polymer-project.org/elements/neon-animation)和Keynote的“Magic Move”。

Introduction 介绍

Hero is a library for building iOS view controller transitions. It provides a layer on top of the UIKit's cumbersome transition APIs. Making custom transitions an easy task for developers.

Hero 是一个用于构建iOS视图控制器转换的库。 它在UIKit的繁琐的转换API之上提供了一个层。 使自定义过渡对于开发人员来说是一个容易的任务。

Features

With Hero, you can easily mix & match these effects to build your own custom transition.

At its core, Hero is similar to Keynote's Magic Move. It checks the heroID property on all source and destinations views. Every matched view pairs are then automatically transitioned from it's old state to it's new state.

Hero can also construct animations for unmatched views. It is easy to define these animations via the heroModifiers property. Hero will run these animations alongside the Magic Move animations. All of these can be interactive, too.

Hero does not make any assumption about how the view is built or structured. It will not modify any of your views' states other than hiding them during the animation. This means that it works with autolayout, programmatic layout, UICollectionView, UITableView, UINavigationController etc...

核心,Hero类似于Keynote的“魔法移动”。 它检查所有源和目的地视图的heroID属性。 然后,每个匹配的视图对自动地从其旧状态转换到其新状态。

Hero还可以为不匹配的视图构建动画。 很容易通过heroModifiers属性定义这些动画。 Hero会在“魔法移动”动画旁边运行这些动画。 所有这些都可以是互动的。

Hero不会对视图是如何构建或构造的做出任何假设。 它不会修改任何视图的状态,除了在动画期间隐藏它们。 这意味着它适用于autolayout,programmatic layout,UICollectionView,UITableView,UINavigationController等...

NOTE: Hero won't work on iPhone 7 Simulators due to a bug by Apple. Try using other simulators or a real device when working with Hero.

Video Demo (Example Project)

There are many examples shown in the HeroExamples project under the Examples folder. Clone or download the project to run it yourself. You can also view the video overview here.

Installation & Usage Guide

Hero is avaliable on Carthage & Cocoapods. See the usage guide for instructions.

Simple Usage Examples

You can do these in the storyboard too!

For detailed explaination about Hero ID, Hero Modifiers, and supported animations:

Read the usage guide

This library is completely new and under heavy development. Might not be stable for production use, but there will be more things to come.

code4app

相关源码推荐:

我来说两句
*滑动验证:
所有评论(5)
AlonMessi 2017-1-4 11:36:07
虽不明,但觉厉...
回复
hellokenken 2017-1-4 11:37:09
膜拜大神~
回复
littleRed 2017-1-4 11:38:17
感谢分享,code4app有你更精彩
回复
BlueManlove 2017-1-4 11:39:33
学习...学习...
回复
phoiu 2017-1-4 11:43:46
code4app确实是个好地方,必须支持~
回复
kengsir 2017-1-4 11:46:07
不错不错,楼主辛苦了。。。
回复
liu2016 2017-1-4 14:18:56
很给力,Code4App有你更精彩!
回复
xiaozhima 2017-1-4 14:26:40
我只是路过打酱油的。
回复
wufer 2017-1-4 15:20:37
精华内容,楼主V5!
回复
提取码:  下载次数:80 状态:已购或VIP 售价:0(原价:0)金钱 下载权限:初级码农 
1734 1 80
联系我们
首页/微信公众账号投稿

帖子代码编辑/版权问题

QQ:435399051,742864542

如何获得代码达人称号?

代码贡献英雄榜
用户名 下载数
通过邮件订阅最新 Code4App 信息
上一条 /4 下一条
联系我们
关闭
合作电话:
13802416937
Email:
435399051@qq.com
商务市场合作/投稿
问题反馈及帮助
联系我们

广告投放| Github|申请友链|手机版|Code4App ( 粤ICP备15117877号-1 )

快速回复 返回顶部 返回列表