PadCodedocs

Layers

See every view on a screen as a tree, select views, rename them, and rearrange them by dragging.

The Library's Layers tab shows every view on the current screen as a tree: each view, and indented under it, the views inside it. It's the easiest way to select a view that's hard to tap on the canvas, and to move views in and out of containers.

Open it with the second icon at the top of the left panel, or ⌘2.

Layers of a new app: the screen My App, then Screen, Page, Title, Helper text, Text, Button and Text Field, nested.

#Read the tree

  • The top row is the screen itself, with its title. Tap it to select nothing, so the Inspector shows the screen's own settings. A brush icon on it means the screen has settings of its own, like a background. See Screens.
  • Each row below is a view. It shows the component's icon and the view's name. A view you haven't named shows the component's name, and a hint of what it says, like Text “Hello, world!”.
  • Indented rows are inside the row above them. Tap the arrow beside a container to fold its views away, or to show them again.
  • Small icons on the right: a lightning bolt means the view has actions; a branch means it has a Show when condition.
  • The eye at the end of each row hides the view: it's gone from the canvas, Preview and the app, but stays in Layers, dimmed, with its eye crossed out. Tap the eye again to show it. Use it to get a view out of the way while you work on what's under it.

A new app's screen starts as Screen, a Scroll Area so that a long screen scrolls. It holds Page, a Column, which holds everything else.

Layers of a finished app: a Scroll Area, a Page, and Header, Progress ring, Quick add and their views, some with a lightning bolt.

#Select views

Tap a row to select its view. The view is outlined on the canvas, and the Inspector shows its settings. With a keyboard attached, hold Shift and tap rows to select several views. See The canvas.

#Rename a view

A name makes a view easy to find, here and in the issues list. Names can be up to 40 characters.

  • Double-tap a row, type the new name and press Return.
  • Or select the row, tap its ⋯ and choose Rename.
  • Or type in the name at the top of the Inspector.

Clear the name to go back to the component's name.

#Rearrange by dragging

Touch and hold a row, then drag it onto another row. Where it lands depends on where you let go over that row:

  • Over a container: its top quarter puts the view above it, its bottom quarter below it, and its middle inside it, at the end.
  • Over any other view: its top half puts the view above it, its bottom half below it.

A line shows "above" and "below"; a highlight shows "inside". Dropping on the outermost view (Screen, in a new app) puts the view at the end of the screen.

You can also drag a tile from the Components tab, or a saved component from My Components, onto a row, to add it right there. Dragging one of several selected views moves them all.

#A layer's menu

Select a row and a ⋯ appears on it. Tap it for the same menu as ⋯ in the Inspector: Rename, Copy, Cut, Paste, Duplicate, Save as Component…, Wrap in, Unwrap (for containers), Move Up, Move Down and Delete. Each item is explained in The ⋯ menu.

A selected layer in Layers, with its ⋯ button.

#Repeaters in Layers

A Repeater shows its views once for each item in a list. On the canvas you see every copy; in Layers you see the views once, inside the Repeater's row, because they're the same views. Change one, and every copy changes.

Select the Repeater's row to see which list it repeats over: its Data in the Style tab, and Repeat for in the Data tab.

A Repeater named Line items selected in Layers, with its Line item row and views inside. On the canvas, its first copy is outlined.

Pins on a Map and marks on a Chart aren't in Layers. You edit them in the Inspector, with the Map or Chart selected.

#See also