TKCoreLayoutItem Class Reference
Inherits from | NSObject |
Conforms to | TKCoreLayout |
Declared in | TKCoreLayoutItem.h |
Tasks
-
sizingMode
property -
stretchMode
property -
alignmentMode
property -
margin
property -
content
property -
– initWithView:
-
– initWithLayer:
-
– initWithLayout:
-
– itemWasRemoved
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
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