iOSSharedViewTransition

iOS 7 based transition library for View Controllers having a Common View

基于iOS7的变换view用的库,让视图控制器共享一个共有的view.

  • Inspired by Shared View Activity Transitions introduced in Android L. 灵感来自于Android L

USAGE

Very Simple 3 Step Process:

非常简单,3步搞定:

  • Download and include ASFSharedViewTransition.h and ASFSharedViewTransition.m in your Project. 下载项目,然后将ASFSharedViewTransition.h / .m文件拷贝到你的项目当中
  • In your app delegate or somewhere else in code do #import "ASFSharedViewTransition.h" and add tansitions like this: 在你的appdelegate方法或者是其他地方,引入头文件ASFSharedViewTransition.h,如下所示
[ASFSharedViewTransition addTransitionWithFromViewControllerClass:[ViewController class]
ToViewControllerClass:[DetailViewController class]
WithNavigationController:(UINavigationController *)self.window.rootViewController
WithDuration:0.3f];

Note: Transition needs to be added only one time and ASFSharedViewTransition will automatically apply transitions whenever specified UINavigationController navigates between any FromViewController and ToViewController instances.

注意:转换的效果只需要被加载一次.之后,ASFSharedViewTransition就会作用在任何UINavigationController与FromViewController之间.

  • Confirm From & To View Controllers to ASFSharedViewTransitionDataSource and provide the Common View by implementing this method: 要确保原控制器与待转换控制器实现了协议方法ASFSharedViewTransitionDataSource.
- (UIView *)sharedView

Thats it! A Sample Demo Application has been included for help.

就酱紫!你可以查看下demo看看.

Installation

iOSSharedViewTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:

你可以用CocoaPods安装:

pod 'iOSSharedViewTransition', '~> 1.0.2'

Coming Soon

  • Adding more transitions to the library 添加更多的转换效果
  • If you would like to request a new feature, feel free to raise as an issue. 如果你有什么好的提议,尽快告诉我

Author

Asif Mujteba, asifmujteba@gmail.com

License

ASFSharedViewTransition is available under the MIT license. See the LICENSE file for more info.

[翻译] iOSSharedViewTransition的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. Docker笔记:常用命令汇总

    Docker常用命令汇总 启动服务 [root@localhost ~]# service docker start Redirecting to /bin/systemctl start docke ...

  2. eclipse中explorer显示方式

    不知道是不是上面的描述.做个记录 project explorer 项目资源管理器 这个要打开代码目录需要再点开java resources 还会出现deployment Descriptor项目工程 ...

  3. 用css实现在横线中间插入文字

    在一些登录或者注册界面中常常可看到,一个大框框上面的横线中有插入文字,大概示意图如下: 这种现象其实是相对位置作用的结果,可以通过相对定位,是某元素恰好出现在div的边框上. position: re ...

  4. xgboost使用

    xgboost的实现方式为多颗CART树,其实xgboost就是类似于随机森林,但是与随机森林不同,他不是多个子树决策的结果,CART树最后会算出一个得分,是一个值,最后算出分类的时候,是多个值结合在 ...

  5. 使用Pelican在Github(国外线路访问)和Coding(国内线路访问)同步托管博客

    本文原文地址:使用Pelican在Github(国外线路访问)和Coding(国内线路访问)同步托管博客 介绍: Github Pages 禁用了百度爬虫,因此百度搜索引擎经常抓取不到在Github上 ...

  6. PLSQL计算质数

    看到有人实现了一个计算质数的函数,就是效率有点差,贴一个以前写的计算质数的算法. 目标很简单,列出100以内的质数.其实算法很简单,两个循环就搞定了.但是发现使用不同的算法,执行效率差别之大相当惊人, ...

  7. haml参考大全

    原文来自: http://blackanger.blog.51cto.com/140924/47642   Haml是一种用来描述任何XHTML web document的标记语言,它是干净,简单的. ...

  8. ADO调用分页查询存储过程

    一.分页存储过程 ----------使用存储过程编写一个分页查询----------------------- set nocount off --关闭SqlServer消息 --set nocou ...

  9. C语言中内存管理规范

    一.内存申请 1.建议使用calloc申请内存,尽量不要使用malloc. calloc在动态分配完内存后,自动初始化该内存空间为零,而malloc不初始化,里边数据是随机的垃圾数据. 2.申请内存大 ...

  10. Angular CLI 安装和使用以及安装失败的解决方法

    背景介绍 关于Angular版本,Angular官方已经统一命名Angular 1.x同一为Angular JS:Angular 2.x及以上统称Angular: CLI是Command Line I ...