I work with a custom view that inherits from UIScrollView. The problem I am facing is adding a UILabel, which should appear at the top, in front of other views. It works, but unfortunately it also covers scroll indicators.

As you can see, the scroll indicator is hiding. I do not want to turn off the scroll indicators.
I add the views directly to the UIScrollView:
UILabel *subsection = [[UILabel alloc] initWithFrame:CGRectMake(0, y * h,
[self totalContentWidth], [tableViewDelegate rowHeight])];
[subsection setText:subsectionName];
[subsection setTextAlignment:NSTextAlignmentCenter];
[subSectionRows setValue:subsection forKey:key];
[self addSubview:subsection];
and then bring them to the fore which
- (void) bringSubsectionsToFront {
for (UIView* row in [self.subSectionRows allValues]) {
[self bringSubviewToFront:row];
}
}
This behavior is confusing to me. If I look into UIView.layer.zPositionall the UIScrollView routines, they are all the same.
bringSubsectionsToFront, , , .
, , , : [self insertSubview:cell atIndex:0];
?
:
verec , , . , , , . :
CustomCell
...
UIImageView
UIImageView
CustomBorderView
UILabel
UILabel
, z, , .
; UILabel CustomCells. , CustomCells 0, , , CustomCells. , CustomCells, , .