Am 31.07.2013 um 07:39 schrieb livinginlosange...@mac.com:

> [_playLayer setAutoresizingMask:kCALayerMinXMargin | kCALayerMaxXMargin | 
> kCALayerMinYMargin | kCALayerMaxYMargin];

> According to this code, the CALayer should be centered, and as the NSView's 
> bounds change, the CALayer's frame should adjust to stay centered in the view 
> while the layer's bounds don't change. However, my special CALayer's bounds 
> grow as I expand my main view.

I think it works exactly the opposite way.

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaViewsGuide/WorkingWithAViewHierarchy/WorkingWithAViewHierarchy.html#//apple_ref/doc/uid/TP40002978-CH4-SW12

(This is about views, not layers. But I'm pretty sure they didn't invert the 
logic for layers only.)

-------
NSViewWidthSizable
If set, the view's width changes proportionally to the change in the 
superview's width. Otherwise, the view's width does not change relative to the 
superview's width.
-------

Which makes sense since kCALayerNotSizable is zero.


Andreas
_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to