Strange UIImageView in UIScrollView Strange UIImageView in UIScrollView xcode xcode

Strange UIImageView in UIScrollView


After magnifying the UIImageView and tweaking with configurations, I have come to conclude that the UIImageView is actually the scroll bar, and if horizontal and vertical scroll is enabled, an "empty" UIScrollview has two subviews inside.


I had the same issue. Calculating the number of subviews can be very deceptive, because of this "feature".

Start the application and count the number of subviews, this will be 1. Now, use you mouse in the simulator or finger on the device and swipe from the right to the left. Count the number of subviews. The number will be 2.

I can deduce nothing else than that this extra UIImageView is produced by Cocoa Touch to render the background in the right color when "bouncing" beyond the end of the UIScrollView's bounds.