ASLayoutablePrivate Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | ASLayoutablePrivate.h |
Overview
The base protocol for ASLayoutable. Generally the methods/properties in this class do not need to be called by the end user and are only called internally. However, there may be a case where the methods are useful.
– finalLayoutable
required method
This method can be used to give the user a chance to wrap an ASLayoutable in an ASLayoutSpec just before it is added to a parent ASLayoutSpec. For example, if you wanted an ASTextNode that was always inside of an ASInsetLayoutSpec, you could subclass ASTextNode and implement finalLayoutable so that it wraps itself in an inset spec.
Note that any ASLayoutable other than self that is returned MUST set isFinalLayoutable to YES. Make sure to do this BEFORE adding a child to the ASLayoutable.
- (id<ASLayoutable>)finalLayoutableReturn Value
The layoutable that will be added to the parent layout spec. Defaults to self.
Declared In
ASLayoutablePrivate.h
isFinalLayoutable
required method
A flag to indicate that this ASLayoutable was created in finalLayoutable. This MUST be set to YES before adding a child to this layoutable.
@property (nonatomic, assign) BOOL isFinalLayoutableDeclared In
ASLayoutablePrivate.h