What's the best way to get a child within child layer? Is there something clean like view.header.button vs view.childrenWithName("button")?
There's no built in way that I know of. You can set these names up pretty easily. When you declare a layer, you can write – view.header.button = new Layer, or you can do it below the new Layer statement – view.header.button = button. Wherever view is in scope, you'll be able to reference the button with view.header.button. Hopefully, that helps.
Thanks for the tip, Kevyn Arnott! I'm looking to do this specifically to target layers attached to a view that's being generated in a loop. So I can target specifically view.header, view.header, etc.. I know I can do the same with childrenWithName.. but it just doesn't seem clean or correct.
Are you able to share your prototoype?
Unfortunately not, sorry!
I made a module for this, and a video to help use it.
Hmm okay, there are a couple ways to do this. Probably the best would be to create an object that stores all the views. Here's an example of it: http://share.framerjs.com/1qvhu3193p4l/ It'll at least give you the syntax you're looking for.