Apple News API PHP Client

FadingStickyHeader
in package
implements SceneInterface

FinalYes

Fading sticky header scene.

The fading_sticky_header scene causes the header to stick to the top of the screen as the user scrolls, then fade out when the section content begins to scroll beneath it.

Tags
see
https://developer.apple.com/documentation/apple_news/fadingstickyheader

Table of Contents

Interfaces

SceneInterface
Interface for all ANF scene types.

Properties

$fadeColor  : string|null
The color to fade to (typically matches the section background).

Methods

fadeToBlack()  : self
Create a FadingStickyHeader that fades to black.
fadeToWhite()  : self
Create a FadingStickyHeader that fades to white.
getType()  : string
Get the scene type identifier.
jsonSerialize()  : array<string, mixed>
{@inheritdoc}
setFadeColor()  : $this
Set the fade color.
withFadeColor()  : self
Create a FadingStickyHeader with a specific fade color.

Properties

$fadeColor

The color to fade to (typically matches the section background).

private string|null $fadeColor = null

Methods

fadeToBlack()

Create a FadingStickyHeader that fades to black.

public static fadeToBlack() : self
Return values
self —

A new FadingStickyHeader instance.

fadeToWhite()

Create a FadingStickyHeader that fades to white.

public static fadeToWhite() : self
Return values
self —

A new FadingStickyHeader instance.

getType()

Get the scene type identifier.

public getType() : string
Return values
string —

The scene type (e.g., 'fading_sticky_header', 'parallax_scale').

jsonSerialize()

{@inheritdoc}

public jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>

setFadeColor()

Set the fade color.

public setFadeColor(string $color) : $this

This is the color the header fades to as the user scrolls. Typically matches the section's background color.

Parameters
$color : string

The color in hex format (e.g., '#000000').

Return values
$this

withFadeColor()

Create a FadingStickyHeader with a specific fade color.

public static withFadeColor(string $color) : self
Parameters
$color : string

The fade color in hex format.

Return values
self —

A new FadingStickyHeader instance.


        
On this page

Search results