0.3.0 • Published 8 years ago
framer-view-manager v0.3.0
Framer-View-Manager
Just another view controller for Framer.
This View Manager for framer makes it easy to create Framer prototypes with:
- Nested views
- Complex navigation
- Dynamic views using real data
Basic concepts
We configure our views using generators. A generator is just a function that returns a new layer.
app.addView("search", () ->
return new Layer
html: 'Im the search layer'
)
To show a new view, simply call that view's generator function. The view manager takes care of the rest.
app.show("home")
Old layers are automatically destroyed as new ones are added. Only the current view (or, the layer created by it's generator) exists. Because of this, you don't have to worry about updating old views or layers – your generator will simply run once again and return a new layer.
app.addView("greeting", (options) ->
return new Layer
html: 'Hello, ' + options.name
)