• 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
Disable implicit animations in layer backed NSScrollViews?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Disable implicit animations in layer backed NSScrollViews?


  • Subject: Disable implicit animations in layer backed NSScrollViews?
  • From: Daniel Waylonis <email@hidden>
  • Date: Mon, 20 Jun 2011 15:52:37 -0700

I'm stuck on a weird bug with NSTableViews and CALayers.  I tried to ask up at WWDC in one of the labs, but didn't get an answer.

I have a auto-resizing NSTableView subclass in NSScrollView in a layer backed view.  I'm using the 10.6 SDK and targeting 10.5 as well.

When I resize, the contents "jump" in the table view.  I believe it is because there's an implicit animation to move the bounds and/or position.  Or maybe something in the clip?  I'd also not like it to fade in if I toggle between layer-backed and not.

I've searched on the mailing lists, StackOverflow, and Google in general for this, but I haven't found a solution.

I've tried the following but without any change to the behavior:

1. Custom NSScrollView and NSTableView, each of which implement what I believe should disable animations:
- (id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)key {
	return (id<CAAction>)[NSNull null];
}

I also tried returning nil as well.

2. Setting the actions (position, bounds, frame, hidden, onOrderIn) on the layers to NSNull.
3. Bracketing live resize methods with a CATransaction to disable animations.  The results were not pretty.

I have a small sample project available: <http://nekotech.com/Code/Splitter.zip>

Oddly enough, when the view is small and the scroll bar is present, the "jumping" doesn't occur.

Thoughts and suggestions welcomed!

Dan
-----------------------------------------
Dan Waylonis | nekotech.com
650.887.3711

_______________________________________________

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: Disable implicit animations in layer backed NSScrollViews?
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Progress Indicators Spin vs Bar
  • Next by Date: Re: Progress Indicators Spin vs Bar
  • Previous by thread: Re: How to design a utilities panel as seen in XCode4?
  • Next by thread: Re: Disable implicit animations in layer backed NSScrollViews?
  • Index(es):
    • Date
    • Thread