canvas 不用寫代碼的動畫
<a href="https://github.com/canvaspod/canvas" target="_blank">https://github.com/canvaspod/canvas</a>
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
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:
如果編譯時提示了你有些錯誤如 accelerate.framework not include ,請更新你的 cocoapods 的版本:
if you're already on cocoapods, installing our library is easy:
如果你已經有 cocoapods 了,安裝我們的庫将會很容易:
make sure you also update the dependencies by running this command afterwards:
確定你更新了依賴哦:
then you should now have the xcode workspace (<code>.xcworkspace</code>) ready.
現在你應該已經有工程檔案了。
你可以在我們部落格上看手把手教的教程。
how to use
using interface builder (no code required)
specify the class <code>csanimationview</code>, and configurate the runtime attributes <code>duration</code>, <code>delay</code>, and <code>type</code>.
指定這個 csanimationview,配置運作時的參數 duration,delay,以及 type。
你也可以從我們這個有着更多解釋資訊的項目demo中着手。
it's very similar to using interface builder, instead you just setup the custom view in code.
與使用 ib 很類似,你也可以用幾行代碼來搞定。
ios 7, xcode 5
who's behind?