Contents

Adding a Scene to a Chapter or a Section Header

Add a scene to your article to create special effects.

Overview

Apple News Format provides animations (see About Component Animations) and behaviors (see About Component Behaviors) to use with individual components in your article, but you can also use a scene — a combination of animations and behaviors — to control how a section or chapter of your article comes into view.

A scene combines animations and behaviors to create special effects that you can use with the headers in section and chapter components. Apple News Format has two scenes you can use to add interest to your article:

  • FadingStickyHeader. Causes the header to briefly “stick” to the top of the screen and then fade to a defined color.

  • ParallaxScaleHeader. Causes the header to zoom out and scroll more slowly than the user is scrolling, giving the impression of a parallax effect.

To add a scene, do the following:

  1. In the components array of your Section or Chapter, add a Header.

  2. In the scene property of the section or chapter component, specify which scene you want to use (fading_sticky_header or parallax_scale). See the example code in FadingStickyHeader.

Topics

Scene Types

See Also

Article Structure