Inherits from NSObject
Conforms to TKCoreLayout
Declared in TKCoreLayoutItem.h

Overview

Represents a base layout item that is used in TKStakLayout class.

Properties

alignmentMode

The alignment mode that will be used when arranging the view.

@property TKCoreLayoutAlignmentMode alignmentMode

Declared In

TKCoreLayoutItem.h

content

Returns the item persisted in this class. It can be a view, a layer or any object implementing the TKCoreLayout interface.

@property (nonatomic, readonly) id content

Declared In

TKCoreLayoutItem.h

margin

The margin that will be used when arranging the view.

@property UIEdgeInsets margin

Declared In

TKCoreLayoutItem.h

sizingMode

The sizing mode that will be used when arranging the view.

@property TKCoreLayoutSizingMode sizingMode

Discussion

The layout sizing modes are defined as follows:

typedef enum { TKLayoutSizingModeFixed, // The stack layout will not change the size for the subview. It will change only the frame origin. TKLayoutSizingModeFit, // The stack layout will use the sizeThatFits method to determine the desired size for the subview. } TKLayoutSizingMode;

Declared In

TKCoreLayoutItem.h

stretchMode

The streching mode that will be used when arranging the view.

@property TKCoreLayoutStretchMode stretchMode

Declared In

TKCoreLayoutItem.h

Instance Methods

initWithLayer:

Initializes the class and associates it with a view.

- (instancetype)initWithLayer:(CALayer *)aLayer

Parameters

aLayer

The layer to be associated with this layout item.

Return Value

An instance of the class, if successfull.

Declared In

TKCoreLayoutItem.h

initWithLayout:

Initializes the class and associates it with a view.

- (instancetype)initWithLayout:(id<TKCoreLayout>)aLayout

Parameters

aLayout

The layout to be associated with this layout item.

Return Value

An instance of the class, if successfull.

Declared In

TKCoreLayoutItem.h

initWithView:

Initializes the class and associates it with a view.

- (instancetype)initWithView:(UIView *)aView

Parameters

aView

The view to be associated with this layout item.

Return Value

An instance of the class, if successfull.

Declared In

TKCoreLayoutItem.h

itemWasRemoved

This method is being called when the item is removed from its owner layout.

- (void)itemWasRemoved

Declared In

TKCoreLayoutItem.h