• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scroller With CATiledLayer Running out of Memory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scroller With CATiledLayer Running out of Memory


  • Subject: Re: Scroller With CATiledLayer Running out of Memory
  • From: David Duncan <email@hidden>
  • Date: Sat, 7 Aug 2010 20:19:28 -0700

On Aug 7, 2010, at 11:51 AM, Gordon Apple wrote:

> So, are you saying that the backing layer will always be the size of the
> view?  Or that there there will always be enough tiles to cover the view?

A CALayer keeps a single backing store. By default the backing store created when -display is called is the size of the layer in pixels (bounds.size * contentsScale). A CATiledLayer's backing store is rather more complex, and only stores enough tiles to cover the area currently visible plus some recently used tiles.

> If that is the case, then it sounds like what you are advocating is to
> create my own scroller or somehow tie the scroller to another (overlaid)
> view with a fixed frame but scrollable bounds, so that it only creates tiles
> (or a single CALayer) needed to display within its frame?


The simplest method would likely be to take the same approach that UITableView takes. Create a subclass of UIScrollView that lays out some small number of views that you render parts of your text into. This is very similar to what ScrollViewSuite does.

I think to some degree you may need to take a step back and think carefully about what you are trying to accomplish and what your bottlenecks really are, because I think part of your issue may be due to assumptions about where your bottlenecks are.
--
David Duncan

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Scroller With CATiledLayer Running out of Memory
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: Scroller With CATiledLayer Running out of Memory (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Hiding Document Files from iTunes
  • Next by Date: Re: Scroller With CATiledLayer Running out of Memory
  • Previous by thread: Re: Scroller With CATiledLayer Running out of Memory
  • Next by thread: Re: Scroller With CATiledLayer Running out of Memory
  • Index(es):
    • Date
    • Thread