Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I add a background image? #39

Open
bibinjacobpulickal opened this issue Sep 27, 2017 · 3 comments
Open

How do I add a background image? #39

bibinjacobpulickal opened this issue Sep 27, 2017 · 3 comments

Comments

@bibinjacobpulickal
Copy link

Tried different methods, either it gets tiled or doesn't zoom along with the tile layer.

@jessedc
Copy link
Owner

jessedc commented Sep 27, 2017

I'm not clear what you're trying to do. Can you elaborate?

@bibinjacobpulickal
Copy link
Author

bibinjacobpulickal commented Oct 2, 2017

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.

@jessedc
Copy link
Owner

jessedc commented Oct 13, 2017

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.

screen shot 2017-10-14 at 9 28 14 am

Just a few ideas, hope it helps 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants