JCTiledScrollView
JCTiledScrollView copied to clipboard
How do I add a background image?
Tried different methods, either it gets tiled or doesn't zoom along with the tile layer.
I'm not clear what you're trying to do. Can you elaborate?
For example, At zoom level 1x I've about 10x10 tiles of dimension 512x512 I also have a down-sampled image of the whole image of dimension of 1024x1024 (the ratio of the whole image is maintained). I would like to add it as the background image of JCTiledScrollView as a whole.
You'd have to modify some internals of JCTiledScrollView.
I'm not sure what you've already tried, but off the top of my head, a persistent background image that appears as a lower resolution version of what you're zooming would probably have to sit within the internal UIScrollView.
If you added another subview behind the the tiled view with it's bounds equal to the content size, would it stay in the same position behind the tiled view as you panned/zoomed around? Would you need to reset the transform to keep it from being zoomed?
Internally the view heirarchy of JCTiledScrollView is quite flat, maybe another option is setting the backgroundColor of the internal UIScrollView to transparent and placing a view behind it? It's position would be static though.

Just a few ideas, hope it helps 😃