Have you tried :

[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue
                 forKey:kCATransactionDisableActions];

// Your code here

[CATransaction commit];

See also:
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Transactions.html
http://www.cocoabuilder.com/archive/message/cocoa/2008/6/25/211097


-Matt


On Nov 22, 2008, at 12:41 PM, Wolf Hauser wrote:

Hello,

Background: the application I am trying to build consists mainly of a WebView. And I need to perform some custom drawing in front of that WebView. First, I simply placed (in IB) a custom view in front of the WebView. Unfortunately, my drawing always took place behind the WebView. A little search in the documentation and on Google revealed that this is normal behavior. The only way to draw in front of such a complex thing as a WebView seems to be using Core Animation layer-backed views. OK. I set the wantsLayer property to YES for the NSView that contains both the WebView and my custom view. Then I set the zPosition of my custom view to 0.1 (arbitrary, greater than zero). It works great, I finally see my drawing.

However, now I have another problem:
Both, my custom view and the WebView are configured to resize with their superview. Before activating wantsLayer, this resizing was a smooth process. Now, however, some animations take place, fading my WebView in and out constantly during the resize. I suspect that these are some implicit transactions or whatever which come with Core Animation (I am totally new to Core Animation).

Question: is there a (simple) way to switch all these implicit behaviors off (while keeping the possibility to stack the two views in layers)?

Any suggestions would be very appreciated...

Wolf

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to