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.
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.