• 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
Responsive scrolling control with lots of subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Responsive scrolling control with lots of subviews


  • Subject: Responsive scrolling control with lots of subviews
  • From: Ben <email@hidden>
  • Date: Mon, 02 Mar 2015 10:44:12 +0000

Hi list,

Since NSCell is apparently on the way out, I've been trying to build a new control I need using views. It's a cut-down spreadsheet-alike grid, similar to MBTableGrid here: https://github.com/brendand/mbtablegrid

Unfortunately, I am running into the to-be-expected performance trouble with keeping a couple of hundred subviews in my control at the same time. It particularly hurts when scrolling. Stuff I've tried includes:

- Removing the off-screen views when possible (still leaves about 150 on screen)
- Keeping a queue of reusable views to avoid allocating new ones
- Attempting to have one view per grid item type and treat it like an NSCell (i.e., lockFocus into the parent view and draw there)

Clearly a smooth-scrolling view-based grid is possible - after all, NSTableView can do it. It's a shame I can't use it for this.

Does anyone have any suggestions on how to achieve decent drawing/scrolling performance here?


- Ben


PS. I have tried using/subclassing NSTableView and have filed a bug for the functionality that I'm after (rdar://17406314 <rdar://17406314> marked as dupe of rdar://2778108 <rdar://2778108>).
_______________________________________________

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: Responsive scrolling control with lots of subviews
      • From: Quincey Morris <email@hidden>
    • Re: Responsive scrolling control with lots of subviews
      • From: Steve Mills <email@hidden>
    • Re: Responsive scrolling control with lots of subviews
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: iOS App trust on first launch
  • Next by Date: Re: How to copy one project product to another project Resources on build (relative path)
  • Previous by thread: Re: iOS App trust on first launch
  • Next by thread: Re: Responsive scrolling control with lots of subviews
  • Index(es):
    • Date
    • Thread