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

  • Home
  • SEARCH
  • 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 4006692
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:32:42+00:00 2026-05-20T08:32:42+00:00

On the iPhone (though I imagine it’s an equally valid question in Cocoa) I

  • 0

On the iPhone (though I imagine it’s an equally valid question in Cocoa) I have a UIScrollView around a UIView backed by a CATiledLayer. The way it works by default is to load any uncached/unfetched tiles when my viewport scrolls over a blank section of the CATiledLayer.

What I would like to know is if there’s a way to trigger CATiledLayer to load a tile that’s not actively being displayed? I would like to, for example, preload all tiles contiguous to the currently displayed tile while they are still offscreen, thus avoiding flashing a blank screen that fades in to the image once it’s loaded asynchronously.

Any ideas?

  • 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-20T08:32:42+00:00Added an answer on May 20, 2026 at 8:32 am

    I don’t think CATiledLayer will do what you want. There are a couple of other options though. First you can disable the tile fade-in and have it display immediately with something like this:

    @interface NoFadeTiledLayer : CATiledLayer {
    }
    @end
    
    @implementation NoFadeTiledLayer
    + (CFTimeInterval)fadeDuration {
        return 0.0;
    }
    @end
    
    @implementation MyViewWithTiledLayer
    + (Class)layerClass {
        return [NoFadeTiledLayer class];
    }
    ...
    @end
    

    Second, you can do your own pre-fetch and caching of the adjacent tiles so they’re ready to go when CATileLayer calls drawLayer:inContext. I’d implement scrollViewDidScroll: and scrollViewDidZoom: to determine the adjacent tiles and levelOfDetail. Then do a cache lookup and add any not present to a pre-fetch/render queue. A background thread could service the queue and subsequent scrolls or zooms would clear and rebuild the queue. Then have drawLayer:inContext check the cache first and only fetch/render if necessary.

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

Sidebar

Related Questions

I am fairly new to iPhone/ObjC programming, though I have several years of experience
I have a glaring CSS problem with my website on iphone even though it
I have a problem here : my app crashed on my Iphone (JB) though
In my iPhone app, I must have around 9-15 different views, all available from
Originally I though I'll just take a screenshot of my app on the iPhone
For iPhone game development, seems there are very like functions using CALayer and UIView,
I have an iPhone app that hides the status bar. However, my main view
Let's say I have an encrypted file on an iPhone and every time I
I'm developing a mobile site for iPhone using jQuery. I have a hidden div
I don't have any problems with my iphone app. Theres no exc_bad_access or memory

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.