• 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
NSTableView and CA backed views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView and CA backed views


  • Subject: NSTableView and CA backed views
  • From: Erwan Ripoll <email@hidden>
  • Date: Sat, 28 Feb 2009 17:49:50 +0100

Hello all,

I'm rather stuck because of what seems to be a drawing bug of NSTableView that I am trying to work around.

It seems that any NSTableView in a NSVIew that has setWantsLayer:YES will flicker whenever the parent view is resized.

In order to work around that bug, I have my window controller written as follow :

-(void)switchToView:(NSView *)newView
{ [placeholderView setWantsLayer:YES];

transition = [CATransition animation];
[transition setType:kCATransitionPush];
[transition setSubtype:kCATransitionFromLeft];
[transition setDuration:0.5];
[transition setDelegate:self];

NSDictionary *ani = [NSDictionary dictionaryWithObject:transition forKey:@"subviews"];
[placeholderView setAnimations:ani];

[...]
[[placeholderView animator] addSubview:currentView];


}
This works fine, but the NSTable in currentview flickers. So, my window controller also does :


- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
{
	NSLog(@"Animation Stopped !");
	if(flag==YES)
	{
		[placeholderView setWantsLayer:NO];

	}
}

Which also works fine. Once the setWantsLayer is NO, the NSTableFlickering stops.

BUT, the next time "switchToView" is called, no animation occur.
Animation DOES occur the next time, but not the time after that... you get my drift.
It is as if the [placeholderView setWantsLayer:YES]; doesn't take effect right away...


Any idea why ?
Or better yet : any other idea to work around the NSTableView Bug ?

Thank you all luch in advance.

Erwan



_______________________________________________

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: Re: renaming a file with special/reserved characters in name
  • Next by Date: Re: renaming a file with special/reserved characters in name
  • Previous by thread: Optimizing, uiview caching, and clearing that cached view.
  • Next by thread: NSAttributedDictionary crash
  • Index(es):
    • Date
    • Thread