ASCenterLayoutSpec Class Reference

Inherits from ASRelativeLayoutSpec : ASLayoutSpec : NSObject
Declared in ASCenterLayoutSpec.h

Overview

Lays out a single layoutElement child and position it so that it is centered into the layout bounds. NOTE: ASRelativeLayoutSpec offers all of the capabilities of Center, and more. Check it out if you would like to be able to position the child at any corner or the middle of an edge.

+ centerLayoutSpecWithCenteringOptions:sizingOptions:child:

Initializer.

+ (instancetype)centerLayoutSpecWithCenteringOptions:(ASCenterLayoutSpecCenteringOptions)centeringOptions sizingOptions:(ASCenterLayoutSpecSizingOptions)sizingOptions child:(id<ASLayoutElement>)child

Parameters

centeringOptions

How the child is centered.

sizingOptions

How much space will be taken up.

child

The child to center.

Declared In

ASCenterLayoutSpec.h