It is the scroll view’s scroll indicator. Notice it is very narrow but tall (5 × 40). This is a private subview of the scroll view; you should leave it alone.
Logging a UIScrollView's subviews shows a subview that wasn't added
-
11-07-2023 - |
Question
When I log a UIScrollView
's subviews by doing this,
NSLog(@"%@", self.scrollView.subviews);
this is what is logged in the console:
(
"<UITextView: 0x936ec00; frame = (35 6; 561 40); text = 'Bvnxbmn'; clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x8b4fbe0>; layer = <CALayer: 0x8b4d5c0>; contentOffset: {0, 0}>",
"<UIImageView: 0x8b70980; frame = (625 267; 5 40); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x8b725a0>>",
"<UITextView: 0xab30000; frame = (34 50; 561 40); text = ''; clipsToBounds = YES; gestureRecognizers = <NSArray: 0x9a5d6a0>; layer = <CALayer: 0x9a54f90>; contentOffset: {0, 0}>"
)
I've added two UITextView
s in the scroll view.
Where did the UIImageView
come from? I haven't put an image view in the scroll view.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow