July 2017
Intermediate to advanced
354 pages
9h 58m
English
The next thing we will do is to make our feed scrollable. For this, we will use the Framer ScrollComponent, which helps us do this task in a simple and fast way. We will do it with the following code:
# SCROLLABLE ELEMENTS INIT# Wrap Activities Feedscroll = ScrollComponent.wrap sketch.Activities_Feedscroll.scrollHorizontal = falsescroll.scrollVertical = truescroll.y -= 42scroll.contentInset = bottom: 182 top: 42
We have created an instance of ScrollComponent with scroll = ScrollComponent.wrap sketch.Activities_Feed, where sketch.Activities_Feed is the layer we will wrap with the scroll component. The ScrollComponent will be inserted between this content layer and its superlayer. With scroll.scrollHorizontal = false ...