Reputation: 181
I have a UIScrollView populated with images, a user can overlay the current image being shown with some other images. When the user is scrolling to view other images in the scrollview the overlaid images still stay in the same position.
My solution right now has been to remove all added images then repopulate the needed ones on the current visible image.
This isn't the best and the transition is too obvious.
Is it possible to scroll an image with an overlaid image together in a scroll view? Ho do I go about it. Many thanks for your help.
Upvotes: 0
Views: 132
Reputation: 4291
Are you sure you've added the overlay images as subviews of the UIScrollView? It should also scroll if the overlay image is a subview of your other image (which then is a subview of your scroll view).
If your controller's view is a normal UIView which has a UIScrollView as its subview, don't add your overlay image as a subview of your controller. Otherwise the overlay image will become a sibling of the scroll view.
Upvotes: 1