Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6718831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:01:14+00:00 2026-05-26T09:01:14+00:00

Is there a way to reset your zoomlevel each time you’re on a deeper

  • 0

Is there a way to reset your zoomlevel each time you’re on a deeper zoomlevel so you can have an endless zoom?

I’m trying to create a CATiledLayer where each tile has a different color and when you zoom into a tile you just get new colors, and so on.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:01:15+00:00Added an answer on May 26, 2026 at 9:01 am

    I’m not sure about how to do this with CATiledLayer, but the book Programming IOS 4, by Matt Neuburg, includes a section “Zooming with Detail” which describes how to do something similar using UIScrollView.

    UIScrollView offers support for pinch-out zooming into its contents, but it just magnifies the unzoomed rendering of its contents with a scale transform rather than re-rendering its contents at the higher zoomScale. Therefore, in order to provide zooming that actually shows increased detail, you need to add some logic.

    Basically, the book suggests you implement scrollViewDidEndZooming:withView:atScale: so that it (1) resets UIScrollView’s zoomScale to its default value of 1.0, and (2) removes the contents view and provides a new view with contents at the desired true zoom scale. You need to introduce your own ivar to track this true scale manually. The result is that, as you zoom further in and the true scale keeps increasing monotonically, the UIScrollView houses a succession of different views and keeps cycling its own zoomScale within its bounds, from 1.0 to max, then reset to 1.0, then 1.0 to max, etc.. The book gives a skeletal example (p 506 in the 1st edition, second printing of the book).

    How would you use this for endless zooming? If you don’t need truly endless zooming, you can just do the above with a very large range for the true scale.

    If you want truly endless zooming, you can’t track your zoom level with a finitely-bounded variable for the true scale. Instead, you’d modify scrollViewDidEndZooming:withView:atScale: so that it (1) resets UIScrollView’s zoomScale to its default value of 1.0, (1) removes the contents view and provides a new view, where the new view at the new zoomScale of 1.0 is visually identical to the removed view at the old zoomLevel. In this way, as the user kept zooming in with pinch-out gestures, UIScrollView would repeatedly cycle from 1.0 to max, invisibly replacing the underlying view at each cycle, in between the user’s gestures.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to reset System.in so I can have a fresh stream
Is there a way to reset to the original vb.net snippets that came along
Is there a way clear or reset the outputcache for an entire website without
Is there an easy way to reset a django database (i.e. drop all data/tables,
Is there's any way how to reset styles back to what's in my CSS?
is there way thats i can preselect an item when the page loads or
Is there a way I can tell the browser to wait to start on
Is there way in next piece of code to only get the first record?
is there way how to get name ov event from Lambda expression like with
Is there way to better identify design pattern in source codes, esp. if you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.