Merge remote-tracking branch 'facebook/master'

This commit is contained in:
Hannah Troisi
2016-03-25 15:47:31 -07:00
4 changed files with 23 additions and 19 deletions

View File

@@ -351,7 +351,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* @abstract The receiver's immediate subnodes.
*/
@property (nonatomic, readonly, strong) NSArray<ASDisplayNode *> *subnodes;
@property (nonatomic, readonly, copy) NSArray<ASDisplayNode *> *subnodes;
/**
* @abstract The receiver's supernode.

View File

@@ -51,7 +51,9 @@ extern void ASDisplayNodePerformBlockOnEveryNode(CALayer *layer, ASDisplayNode *
}
if (layer) {
for (CALayer *sublayer in [layer sublayers]) {
/// NOTE: The docs say `sublayers` returns a copy, but it does not.
/// See: http://stackoverflow.com/questions/14854480/collection-calayerarray-0x1ed8faa0-was-mutated-while-being-enumerated
for (CALayer *sublayer in [[layer sublayers] copy]) {
ASDisplayNodePerformBlockOnEveryNode(sublayer, nil, block);
}
} else if (node) {

View File

@@ -33,24 +33,24 @@ extern BOOL ASRangeTuningParametersEqualToRangeTuningParameters(ASRangeTuningPar
_tuningParameters = std::vector<std::vector<ASRangeTuningParameters>> (ASLayoutRangeModeCount, std::vector<ASRangeTuningParameters> (ASLayoutRangeTypeCount));
_tuningParameters[ASLayoutRangeModeFull][ASLayoutRangeTypeDisplay] = {
.leadingBufferScreenfuls = 1.0,
.trailingBufferScreenfuls = 0.5
};
_tuningParameters[ASLayoutRangeModeFull][ASLayoutRangeTypeFetchData] = {
.leadingBufferScreenfuls = 2.5,
.trailingBufferScreenfuls = 1.5
};
_tuningParameters[ASLayoutRangeModeMinimum][ASLayoutRangeTypeDisplay] = {
.leadingBufferScreenfuls = 0.25,
.trailingBufferScreenfuls = 0.25
};
_tuningParameters[ASLayoutRangeModeMinimum][ASLayoutRangeTypeFetchData] = {
.leadingBufferScreenfuls = 1,
.trailingBufferScreenfuls = 1
.leadingBufferScreenfuls = 0.25,
.trailingBufferScreenfuls = 0.5
};
_tuningParameters[ASLayoutRangeModeFull][ASLayoutRangeTypeDisplay] = {
.leadingBufferScreenfuls = 1.5,
.trailingBufferScreenfuls = 0.75
};
_tuningParameters[ASLayoutRangeModeFull][ASLayoutRangeTypeFetchData] = {
.leadingBufferScreenfuls = 3,
.trailingBufferScreenfuls = 2
};
_tuningParameters[ASLayoutRangeModeVisibleOnly][ASLayoutRangeTypeDisplay] = {
.leadingBufferScreenfuls = 0,
.trailingBufferScreenfuls = 0

View File

@@ -96,12 +96,13 @@ typedef NS_ENUM(NSUInteger, ASHorizontalAlignment) {
/** Right aligned */
ASHorizontalAlignmentRight,
// After 2.0 has landed, we'll add ASDISPLAYNODE_DEPRECATED here - for now, avoid triggering errors for projects with -Werror
/** @deprecated Use ASHorizontalAlignmentLeft instead */
ASAlignmentLeft ASDISPLAYNODE_DEPRECATED = ASHorizontalAlignmentLeft,
ASAlignmentLeft = ASHorizontalAlignmentLeft,
/** @deprecated Use ASHorizontalAlignmentMiddle instead */
ASAlignmentMiddle ASDISPLAYNODE_DEPRECATED = ASHorizontalAlignmentMiddle,
ASAlignmentMiddle = ASHorizontalAlignmentMiddle,
/** @deprecated Use ASHorizontalAlignmentRight instead */
ASAlignmentRight ASDISPLAYNODE_DEPRECATED = ASHorizontalAlignmentRight,
ASAlignmentRight = ASHorizontalAlignmentRight,
};
/** Orientation of children along vertical axis */
@@ -115,10 +116,11 @@ typedef NS_ENUM(NSUInteger, ASVerticalAlignment) {
/** Bottom aligned */
ASVerticalAlignmentBottom,
// After 2.0 has landed, we'll add ASDISPLAYNODE_DEPRECATED here - for now, avoid triggering errors for projects with -Werror
/** @deprecated Use ASVerticalAlignmentTop instead */
ASAlignmentTop ASDISPLAYNODE_DEPRECATED = ASVerticalAlignmentTop,
ASAlignmentTop = ASVerticalAlignmentTop,
/** @deprecated Use ASVerticalAlignmentCenter instead */
ASAlignmentCenter ASDISPLAYNODE_DEPRECATED = ASVerticalAlignmentCenter,
ASAlignmentCenter = ASVerticalAlignmentCenter,
/** @deprecated Use ASVerticalAlignmentBottom instead */
ASAlignmentBottom ASDISPLAYNODE_DEPRECATED = ASVerticalAlignmentBottom,
ASAlignmentBottom = ASVerticalAlignmentBottom,
};