PadCodedocs

Scroll To

Scrolls a Scroll Area until a view is visible.

Category: Navigation

#When to use it

Use it to bring part of a long screen into sight: the newest message, the top of a list, a section someone picked.

#Example

A chat screen's Send button: Add to List adds the message, then Scroll To with Id: Latest and Anchor: Bottom. Latest is the name of the last view inside the Scroll Area.

#Good to know

  • Id is the view's name. Name it first: tap its name at the top of the Inspector, or rename it in Layers, then type that name here.
  • The view has to be inside a Scroll Area. If no view has that name, the step fails.

#Add it

Select a view, open the Inspector's Actions tab, pick when it runs, tap Add action and choose Scroll To (under Navigation). Tap the step to open its settings.

#Settings

SettingWhat it doesKindDefault
IdThe id of the view to bring into view.TextRequired
AnchorWhere it should end up.Choice: Top, Center, Bottomcenter

#See also