[Framer Meetup@UXD2 Day 4] Scroll (9/3)

Kyuho Lee
2 min readAug 26, 2018

--

이제 중급으로 넘어가자.

Scroll component의 모든 것

Layer를 만들고 scroll 시키는 법

Scrolll을 만드는 방법은 여러가지 방법이 있지만, 그래도 가장 쉬운 방법은 Design 창에서 layer를 만들고 wrap하는 방법이다.

layerA = new Layerscroll = ScrollComponent.wrap(layerA)

Evnet에 따라서 다른 component를 변화시키는 법

onStart, onMove면 충분하다.

# For Events.Movescroll.onMove ->print “Moving”
# For Events.ScrollStartscroll.onScrollStart ->print “Start of scroll”

Scroll를 강제로 하는 범

때로는 다른 버튼으로 scroll을 시킬 때가 있다.

# Scroll content to x: 200, y: 100scroll.scrollToPoint(   x: 200, y: 100   true   curve: Bezier.ease)

자 그러면 시작해 볼까?

--

--

No responses yet