UIScrollView phantom subviews

后端 未结 1 1253
渐次进展
渐次进展 2020-12-29 06:39

I am loading a view from a nib file using:

NSArray *nibViews = [[NSBundle mainBundle] loadNibNamed:@\"AnalysisView\" owner:self options:nil];
AnalysisView *g         


        
相关标签:
1条回答
  • 2020-12-29 07:14

    UIScrollView by default contains 2 UIImageViews as subviews for scroll indicators. Although I can't find anything specific about scroll indicators implementation in docs, those imageviews are present in class declaration (see UIScrollView.h header):

    UIKIT_CLASS_AVAILABLE(2_0) @interface UIScrollView : UIView <NSCoding> {
        ...
        UIImageView* _verticalScrollIndicator;
        UIImageView* _horizontalScrollIndicator;
    

    You can also start assigning tags not from 0, but from some positive number - that way avoiding collision with standard subviews

    0 讨论(0)
提交回复
热议问题