Fixed way that ScrollView handles removeClippedSubviews flag

This commit is contained in:
Marek Cirkos 2015-04-20 05:09:54 -07:00
Родитель fb1fa12e89
Коммит 88b6df9900
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -175,7 +175,7 @@ CGFloat const ZINDEX_STICKY_HEADER = 50;
scrollBounds.origin.y += self.contentInset.top;
NSInteger i = 0;
for (UIView *subview in contentView.subviews) {
for (UIView *subview in contentView.reactSubviews) {
CGRect rowFrame = [RCTCustomScrollView _calculateUntransformedFrame:subview];
if (CGRectIntersectsRect(scrollBounds, rowFrame)) {
firstIndexInView = i;
@ -198,8 +198,8 @@ CGFloat const ZINDEX_STICKY_HEADER = 50;
NSInteger nextDockedIndex = (stickyHeaderii < _stickyHeaderIndices.count - 1) ?
[_stickyHeaderIndices[stickyHeaderii + 1] integerValue] : -1;
UIView *currentHeader = contentView.subviews[currentlyDockedIndex];
UIView *previousHeader = previouslyDockedIndex >= 0 ? contentView.subviews[previouslyDockedIndex] : nil;
UIView *currentHeader = contentView.reactSubviews[currentlyDockedIndex];
UIView *previousHeader = previouslyDockedIndex >= 0 ? contentView.reactSubviews[previouslyDockedIndex] : nil;
CGRect curFrame = [RCTCustomScrollView _calculateUntransformedFrame:currentHeader];
if (previousHeader) {
@ -210,7 +210,7 @@ CGFloat const ZINDEX_STICKY_HEADER = 50;
previousHeader.transform = CGAffineTransformMakeTranslation(0, yOffset);
}
UIView *nextHeader = nextDockedIndex >= 0 ? contentView.subviews[nextDockedIndex] : nil;
UIView *nextHeader = nextDockedIndex >= 0 ? contentView.reactSubviews[nextDockedIndex] : nil;
CGRect nextFrame = [RCTCustomScrollView _calculateUntransformedFrame:nextHeader];
if (curFrame.origin.y < scrollBounds.origin.y) {