Re: CALayer contentScale initialization, where to do it?

2012-06-17 Thread David Duncan
Same concept applies. Set it when you assign the layer or add the view. -- David Duncan @ My iPhone On Jun 17, 2012, at 12:55 AM, Markus Spoettl wrote: > On 6/17/12 9:15 AM, David Duncan wrote: >> contentsScale won't matter until you the layer into a window, so why not >> just assign it when yo

Re: CALayer contentScale initialization, where to do it? (SOLVED)

2012-06-17 Thread Markus Spoettl
On 6/17/12 9:15 AM, David Duncan wrote: contentsScale won't matter until you the layer into a window, so why not just assign it when you add the layer as a sublayer? Turns out that my problem was caused by the time the NSView's root layer was set up: In previous AppKit versions, NSView's -se

Re: CALayer contentScale initialization, where to do it?

2012-06-17 Thread Markus Spoettl
On 6/17/12 9:15 AM, David Duncan wrote: contentsScale won't matter until you the layer into a window, so why not just assign it when you add the layer as a sublayer? That works for sub-layers if the root has been set up already, but when do you suggest to set the view's root layer contentsSca

Re: CALayer contentScale initialization, where to do it?

2012-06-17 Thread David Duncan
contentsScale won't matter until you the layer into a window, so why not just assign it when you add the layer as a sublayer? -- David Duncan @ My iPhone On Jun 16, 2012, at 10:57 PM, Markus Spoettl wrote: > On 6/16/12 11:59 PM, Kyle Sluder wrote: >> That's the same document I was referring to

Re: CALayer contentScale initialization, where to do it?

2012-06-16 Thread Markus Spoettl
On 6/16/12 11:59 PM, Kyle Sluder wrote: That's the same document I was referring to. But it also contains this very useful section, titled "Manage Core Animation Layer Contents And Scale": https://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Captur

Re: CALayer contentScale initialization, where to do it?

2012-06-16 Thread Kyle Sluder
On Jun 16, 2012, at 1:53 PM, Markus Spoettl wrote: > On 6/16/12 8:08 PM, Kyle Sluder wrote: >>> I usually create the layers (if there's a fixed number of them) in the >>> view's -initWithFrame:. At that point the view doesn't have a window, so I >>> can't set contentScale correctly (by getting th

Re: CALayer contentScale initialization, where to do it?

2012-06-16 Thread Markus Spoettl
On 6/16/12 8:08 PM, Kyle Sluder wrote: I usually create the layers (if there's a fixed number of them) in the view's -initWithFrame:. At that point the view doesn't have a window, so I can't set contentScale correctly (by getting the window's backingScaleFactor). Is this strategy documented som

Re: CALayer contentScale initialization, where to do it?

2012-06-16 Thread Kyle Sluder
On Jun 16, 2012, at 4:13 AM, Markus Spoettl wrote: > I usually create the layers (if there's a fixed number of them) in the view's > -initWithFrame:. At that point the view doesn't have a window, so I can't set > contentScale correctly (by getting the window's backingScaleFactor). Is this stra

CALayer contentScale initialization, where to do it?

2012-06-16 Thread Markus Spoettl
Hello, I have a number of layer hosting custom views (which are all delegate-drawn) and I'm pulling my hair out to find a good place to initialize the contentScale layer property. I usually create the layers (if there's a fixed number of them) in the view's -initWithFrame:. At that point t