Re: nscollectionview dims and brightens frequently with call to setContent:
Re: nscollectionview dims and brightens frequently with call to setContent:
- Subject: Re: nscollectionview dims and brightens frequently with call to setContent:
- From: Kyle Sluder <email@hidden>
- Date: Thu, 10 Nov 2011 16:18:49 -0800
On Thu, Nov 10, 2011 at 3:09 PM, Michael Hanna <email@hidden> wrote:
> in an nscollectionview, I call setContent: every time I get a new item for
> the collection view. The annoying side-effect of this is that the whole
> view dims and brightens each time setContent: is called.. not visually
> appealing.
Are you not reusing items when building the new array? It sounds like
NSCollectionView might be performing a pointer equality test and
creating new collection items for all of the members of the content
array.
Alternatively, -setContent: could just be very naïve (read: broken)
and always rebuild the entire view when called. In that case, I'd
suggest using the content binding instead. I know that the binding
doesn't have this problem.
>
> I've tried disabling CATransactions while calling setContent: but that
> seems no change.
Shot in the dark: after trying the above suggestions, try using
NSAnimationContext instead of CATransaction. NSOutlineView might be
creating explicit CATransactions; the AppKit classes are supposed to
consult the current NSAnimationContext for the values that inform
their explicit CATransactions.
If calling [[NSAnimationContext currentContext] setDuration:0] doesn't
disable NSCollectionView animations, file a bug.
--Kyle Sluder
_______________________________________________
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