ASBackgroundLayoutSpec Class Reference

Inherits from ASLayoutSpec : NSObject
Declared in ASBackgroundLayoutSpec.h

Overview

Lays out a single layoutElement child, then lays out a background layoutElement instance behind it stretched to its size.

  background

Background layoutElement for this layout spec

@property (nullable, nonatomic, strong) id<ASLayoutElement> background

Declared In

ASBackgroundLayoutSpec.h

+ backgroundLayoutSpecWithChild:background:

Creates and returns an ASBackgroundLayoutSpec object

+ (instancetype)backgroundLayoutSpecWithChild:(id<ASLayoutElement>)child background:(nullable id<ASLayoutElement>)background

Parameters

child

A child that is laid out to determine the size of this spec.

background

A layoutElement object that is laid out behind the child. If this is nil, the background is omitted.

Declared In

ASBackgroundLayoutSpec.h