Skip to content

Commit

Permalink
Add description to ASLayout (facebookarchive#1973)
Browse files Browse the repository at this point in the history
* Add description to ASLayout

* Constrained size is a size range, print correctly

* Add missing closing bracket
  • Loading branch information
levi authored and appleguy committed Jul 24, 2016
1 parent a6e03e8 commit c6b17ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AsyncDisplayKit/Layout/ASLayout.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#import "ASLayout.h"

#import "ASDimension.h"
#import "ASInternalHelpers.h"
#import "ASLayoutSpecUtilities.h"

Expand Down Expand Up @@ -138,6 +139,12 @@ + (instancetype)layoutWithLayout:(ASLayout *)layout position:(CGPoint)position
sublayouts:layout.sublayouts];
}

- (NSString *)description
{
return [NSString stringWithFormat:@"<<ASLayout: %p>, position = %@; size = %@; constrainedSizeRange = %@>",
self, NSStringFromCGPoint(self.position), NSStringFromCGSize(self.size), NSStringFromASSizeRange(self.constrainedSizeRange)];
}

#pragma mark - Layout Flattening

- (ASLayout *)filteredNodeLayoutTree
Expand Down

0 comments on commit c6b17ba

Please sign in to comment.