• 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
NSScrollView subclass not working with inertia
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSScrollView subclass not working with inertia


  • Subject: NSScrollView subclass not working with inertia
  • From: Carter Allen <email@hidden>
  • Date: Sun, 13 Feb 2011 19:17:23 -0700

I am currently implementing my own NSTableView replacement that uses views instead of cells, and is fairly similar to the way that UITableView works (uses reusable views, queuing, etc.) Everything is working quite well, except for one problem. Similar to how UITableView works, the new table view (called CZTableView) is a subclass of a scroll view. The scroll view (CZScrollView) is a subclass of NSScrollView, and uses a subclass of NSClipView called CZClipView. I know, lots of subclasses, but most of them do very little.

Scrolling is working almost perfectly. The last issue is inertia. I have inertia enabled in System Preferences, and it clearly works in other apps. The problem is that it doesn't work in the custom scroll view. Has anyone ever experienced this with a scroll view?

A few thoughts:

- All views (scroll view, clip view, and table view) are layer-backed. I don't think this should make a different, but layers on OS X have always been a crapshoot.
- The table view overrides -reflectScrolledClipView: to draw new cells as needed (pulling them out of the queue, all that jazz). It does call super, but I'm not sure if this could cause problems. This gets called repeatedly until I stop scrolling, and it stops immediately, meaning that whatever scrolling events that should be caused by inertia aren't making it that far.
- All views have their coordinates flipped.
- I know there is a setting you can put in the app preferences file to disable inertial scrolling, and I haven't added it.

If code samples would help, I'd be happy to provide them. I'd rather only give out what needs to be seen though, as there is quite a bit of code involved to make the table view work.

Sincerely,
Carter Allen_______________________________________________

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

  • Prev by Date: Quick Look Preview with Scrollbar
  • Next by Date: Re: Parsing PDF
  • Previous by thread: Re: Quick Look Preview with Scrollbar
  • Next by thread: Sharing a model
  • Index(es):
    • Date
    • Thread