Hi Guys,Need a little help for a project, how to transform a View into a Scrollview easily? I succeed by changing the overflow property but maybe there is a better way to do it?I export from Sketch if that can help you, thanks!
I'm looking at the source for a better way, but here's a proposal:
Instantiate a new ScrollView based on your ImageView and modify it from there.
For instance, for a view from Sketch called sketchView:
scrollingSketchView = new ScrollView(sketchView); // Take all the properties of the original image view and apply it to a new scroll viewsketchView.visible = false; // Hide the original.
An alternative would be to create a new ScrollView and set it as the superView of your ImageView.
Thanks a lot!Now it's clear for me, one more question ;I'm duplicating view but is there a way to change the name of the view easily?Something like View.name = ...; ?
Found it, sorry guys for the question, next time I'll test before asking :D