TKStackLayout Class Reference
Inherits from | NSObject |
Conforms to | TKLayout |
Declared in | TKStackLayout.h |
Tasks
-
frame
property -
arrangedViews
property -
orientation
property -
distribution
property -
alignment
property -
spacing
property -
– initWithFrame:
-
– addArrangedView:
-
– insertArrangedView:atIndex:
-
– removeArrangedView:
-
– removeAllArrangedViews
-
– measurePreferredSizeThatFitsSize:
-
– arrangeView:withLayoutInfo:
-
– layoutArrangedViews
Properties
alignment
Stack layout’s alignment.
@property (nonatomic) TKStackLayoutAlignment alignment
Declared In
TKStackLayout.h
arrangedViews
An array containing the views that will be layed out.
@property (nonatomic, strong, readonly) NSArray *arrangedViews
Declared In
TKStackLayout.h
distribution
Stack layout’s distribution.
@property (nonatomic) TKStackLayoutDistribution distribution
Declared In
TKStackLayout.h
frame
The rect in which the views will be arranged.
@property (nonatomic) CGRect frame
Declared In
TKStackLayout.h
Instance Methods
addArrangedView:
Adds arranged view.
- (void)addArrangedView:(UIView *)view
Parameters
- view
The view that will be added to the layout.
Declared In
TKStackLayout.h
arrangeView:withLayoutInfo:
Updates the view with the corresponding layuout info.
- (void)arrangeView:(UIView *)view withLayoutInfo:(TKLayoutInfo *)layoutInfo
Parameters
- view
The view that will be arranged.
- layoutInfo
The layout info.
Declared In
TKStackLayout.h
initWithFrame:
Instantiates TKStackLayout object.
- (id)initWithFrame:(CGRect)frame
Parameters
- frame
The layout’s frame.
Return Value
TKStackLayout instance.
Declared In
TKStackLayout.h
insertArrangedView:atIndex:
Inserts arranged view.
- (void)insertArrangedView:(UIView *)view atIndex:(NSUInteger)index
Parameters
- view
The view that will be inserted.
- index
The index at which the view will be inserted.
Declared In
TKStackLayout.h
layoutArrangedViews
Lays out the arranged views.
- (void)layoutArrangedViews
Declared In
TKStackLayout.h
measurePreferredSizeThatFitsSize:
Measures the size of the of the arranged views to fit in the specified size.
- (CGSize)measurePreferredSizeThatFitsSize:(CGSize)size
Parameters
- size
The size that the views must fit after arrangement.
Return Value
The optimal size to fit the desired size.
Declared In
TKStackLayout.h