Canvas 不用写代码的动画

https://github.com/CanvasPod/Canvas

Canvas is a project to simplify iOS development for both designers and developers. It had been difficult for designers to get hands on building the product with the lack of objective-c and Xcode experience, and a hard time for developer to use reasonable amount of time and lines of code just to achieve really simple effects.

With Canvas, creating stunning animations requires zero lines of code, trendy effects like the Parallax headers, Sticky sections, Blurred Backgrounds, will be as simple as few lines of code changes.

Canvas 是一个用来简化 iOS 设计的项目。对于初级开发者而言,如果连 Xcode 都用不顺手,甚至为了实现一个效果需要写好多好多的代码而苦逼。

使用 Canvas ,创建一个动画效果只需要一行代码,那些时髦的效果诸如视差、不动的区域、模糊化的背景,这些只需要几行代码。

Demo App

The demo app in this project uses CocoaPods, please run pod install after you download this project, then open Canvas.xcworkspace.

demo 使用的 CocoaPods,在下载这个应用之前,请先运行 pod install,之后再打开 Canvas.xcworkspace。

See this screencast in action:

Unable to build demo?

If you're getting some errors like Accelerate.framework not include, please update your CocoaPods version:

$ [sudo] gem install cocoapods

We also have a live demo avaliable at homepage.

如果编译时提示了你有些错误如 Accelerate.framework not include ,请更新你的 CocoaPods 的版本:

Getting Started

If you're already on CocoaPods, installing our library is easy:

如果你已经有 CocoaPods 了,安装我们的库将会很容易:

$ edit Podfile
platform :ios, '7.0'
pod 'Canvas', '~> 0.1'

Make sure you also update the dependencies by running this command afterwards:

确保你更新了依赖哦:

pod install

Then you should now have the Xcode workspace (.xcworkspace) ready.

现在你应该已经有工程文件了。

$open App.xcworkspace

That's it and you are good to go! See our blog posts for hands on tutorial.

你可以在我们博客上看手把手教的教程。

How to Use

Using Interface Builder (no code required)

Specify the class CSAnimationView, and configurate the runtime attributes durationdelay, and type.

Please also get started with our more detailed explaination on what Canvas can do.

指定这个 CSAnimationView,配置运行时的参数 duration,delay,以及 type。

你也可以从我们这个有着更多解释信息的项目demo中着手。

Using Code

It's very similar to using Interface Builder, instead you just setup the custom view in code.

与使用 IB 很类似,你也可以用几行代码来搞定。

CSAnimationView *animationView = [[CSAnimationView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];

animationView.backgroundColor = [UIColor whiteColor];

animationView.duration = 0.5;
animationView.delay = 0;
animationView.type = CSAnimationTypeMorph; [self.view addSubview:animationView]; // Add your subviews into animationView
// [animationView addSubview:<#(UIView *)#>] // Kick start the animation immediately
[animationView startCanvasAnimation];

Requirements

iOS 7, Xcode 5

Who's behind?

[翻译] Canvas 不用写代码的动画的更多相关文章

  1. 推荐一款最强Python自动化神器!再也不用写代码了!

    本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,如有问题请及时联系我们以作处理 搞过自动化测试的小伙伴,相信都知道,在Web自动化测试中,有一款自动化测试神器工具: seleniu ...

  2. 不用写代码就能实现深度学习?手把手教你用英伟达 DIGITS 解决图像分类问题

    2006年,机器学习界泰斗Hinton,在Science上发表了一篇使用深度神经网络进行维数约简的论文 ,自此,神经网络再次走进人们的视野,进而引发了一场深度学习革命.深度学习之所以如此受关注,是因为 ...

  3. 不用写代码也能做表单 —— 加载meta即可

    做增删改查要写多少代码? 一个表单一套代码,十个表单十套代码吗? 我这么懒,怎么会写这么多代码? 我想做到:即使一百个表单也只需要一套代码(而且不需要复制粘贴).实现多个表单,只需要加载不同的meta ...

  4. 不用写代码的框架 - RobotFramework+Eclispe环境安装篇

    环境安装是学习任何一个新东西的第一步,这一步没走舒坦,那后面就没有心情走下去了. 引用名句:工欲善其事必先利其器!! Robotframework:一款 自动化测试框架. Eclipse:一款编辑工具 ...

  5. sailsjs 不用写代码就能生成rest api 代码

    1. 脚手架安装 npm install sails -g     2. 生成基本项目 a. 项目 sails new appdemo b. 创建api sails new api demoapi a ...

  6. 瞧一瞧,看一看呐,用MVC+EF快速弄出一个CRUD,一行代码都不用写,真的一行代码都不用写!!!!

    瞧一瞧,看一看呐用MVC+EF快速弄出一个CRUD,一行代码都不用写,真的一行代码都不用写!!!! 现在要写的呢就是,用MVC和EF弄出一个CRUD四个页面和一个列表页面的一个快速DEMO,当然是在不 ...

  7. 使用 .NET WinForm 开发所见即所得的 IDE 开发环境,实现不写代码直接生成应用程序

    直接切入正题,这是我09年到11年左右业余时间编写的项目,最初的想法很简单,做一个能拖拖拽拽就直接生成应用程序的工具,不用写代码,把能想到的业务操作全部封装起来,通过配置的方式把这些业务操作组织起来运 ...

  8. 文档驱动 —— 表单组件(五):基于Ant Design Vue 的表单控件的demo,再也不需要写代码了。

    源码 https://github.com/naturefwvue/nf-vue3-ant 特点 只需要更改meta,既可以切换表单 可以统一修改样式,统一升级,以最小的代价,应对UI的升级.切换,应 ...

  9. html5 canvas首屏自适应背景动画循环效果代码

    模板描述:html5 canvas首屏自适应背景动画循环效果代码 由于动态图太大,怕以后服务器受不了,所以现在都改为静态图了,大家点击演示地址一样的,希望大家喜欢,你们的支持就是小海的动力!! 欢迎大 ...

随机推荐

  1. Condition接口

    <Java并发编程艺术>读书笔记 Condition介绍 任意一个Java对象,都拥有一组监视器方法(定义在java.lang.Object中),主要包括wait().wait(long ...

  2. LeetCode301. Remove Invalid Parentheses

    Remove the minimum number of invalid parentheses in order to make the input string valid. Return all ...

  3. javscript练习(三)

    编写一个函数,计算两个数字的和差积商 function calculator(num1,num2,sign){          switch(sign){                   cas ...

  4. jquery文档

    http://jquery.cuishifeng.cn/selected_1.html

  5. sin()函数的实现

    计算如下公式,并输出结果: 其中r.s的值由键盘输入.sin x的近似值按如下公式计算,计算精度为10-10: 程序说明: #include <math.h>和#include<cm ...

  6. 【Java】 String和char[]类型间的相互转化

    (1)String类型转char[] 类型,使用String类型的toCharArray()方法: (2)char[] 类型转String类型,使用String.valueOf()方法: public ...

  7. HDU 1231.最大连续子序列-dp+位置标记

    最大连续子序列 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Sub ...

  8. CodeForces 772A Voltage Keepsake

    二分答案,验证. 二分到一个答案,比他小的时间都需要补充到这个时间,计算所需的量,然后和能提供的量进行比较. #include <cstdio> #include <cmath> ...

  9. SpringBoot学习(六)

    1.pom 文件 <?xml version="1.0" encoding="utf-8"?> <dependencies> <d ...

  10. appcompat_v7怎么不创建

    韩梦飞沙  韩亚飞  313134555@qq.com  yue31313  han_meng_fei_sha 我们建项目时直接把最小SDK选在Android4.0以上不就不需要这个支持库