Re: resizing window containing NSView with CALayer

2011-08-08 Thread Kyle Sluder
On Mon, Aug 8, 2011 at 4:37 PM, Ken Ferry  wrote:
> See also Cocoa Auto Layout, which addresses this issue among others.  (Have
> people caught this? I'm a little surprised there hasn't been more chatter.
>  We're replacing the autoresizing mask entirely.)

I would imagine it will get more popular as people have the luxury and
time to rewrite their interfaces to target Lion only.

--Kyle Sluder
___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread Ken Ferry
On Mon, Aug 8, 2011 at 5:23 AM, Graham Cox  wrote:

>
> On 08/08/2011, at 9:35 PM, julius wrote:
>
> > When I go and drag the resize handle to make the window as small as I can
> make it, i.e. so the window's content rect has zero height then the view
> misbehaves, i.e. the top of the view shifts from being some 100 pixels below
> the title bar to being 0 pixels below it!
>
>
> Ummm, well, that's not what you said was going on originally. This is
> normal.
>
> The reason this happens is that once either the width or height goes to 0,
> there's nothing for the view sizing code to mutliply by to end up with the
> destination size - once you hit a zero, the sizing information is lost. To
> prevent this, set a minimum size on the window. This is a good idea in any
> case - there is no possible use for a zero-sized window.


See also Cocoa Auto Layout, which addresses this issue among others.  (Have
people caught this? I'm a little surprised there hasn't been more chatter.
 We're replacing the autoresizing mask entirely.)

Programming 
guide,
release 
notes,
IB 
docs,
sample 
code,
WWDC 
video
.

-Ken
Cocoa Frameworks
___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread julius

On 8 Aug 2011, at 14:00, Graham Cox wrote:

> 
> Doing it this way should make your layer immune from the zero size problem.
> 
Thanks. That's really helpful.
Amazon's just mailed to say the Core Animation book should be with me in a few 
days.
>From what I've seen and tried so far this layered and managed approach looks 
>beautifully structured and versatile.
Best wishes
Julius 

http://juliuspaintings.co.uk



___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread Graham Cox

On 08/08/2011, at 10:42 PM, julius wrote:

>> The reason this happens is that once either the width or height goes to 0, 
>> there's nothing for the view sizing code to mutliply by to end up with the 
>> destination size - once you hit a zero, the sizing information is lost. To 
>> prevent this, set a minimum size on the window. This is a good idea in any 
>> case - there is no possible use for a zero-sized window.
>> 
> Of course.
> Normal behaviour and understandable.
> Bit of a surprise when I came across it but!


There's a fairly easy way to avoid this with layers. If you set a layoutManager 
on the root layer, then it will be called when the host view is resized, and 
you can use that to calculate the content layer's size & position from known 
values. This gives you the ability to lay out layers in a more complex way than 
is possible with the 'struts and springs' model (which is being superseded in 
Lion forward anyway).

I'd suggest that you add a layer to the window which is the size of the window 
at all times, then add any other layers that you want as sublayers of this. 
That way, you have a layer behind everything that you can rely on to host any 
other layers you need. If that root layer sets the view as its layoutManager, 
then you can do this for example:

// in MyView:

- (void)layoutSublayersOfLayer:(CALayer*) layer
{
 CGRect insetRect = CGRectInset(layer.bounds, 30, 30 );  // or however this 
layer relates to the root

 myRealContentLayer.frame = insetRect;
}



This supposes the view has a data member 'myRealContentLayer' which is 
initialised to the layer you created AND ADDED as a sublayer to the master 
layer. So your view's init method might look like this:

- (id)initWithFrame:(NSRect) frame
{
self = [super initWithFrame:frame];
   if( self )
   {
   CALayer* root = [CALayer layer];
   root.frame = NSRectToCGRect( frame );
   self.layer = root;
   [self setWantsLayer:YES];
root.layoutManager = self;
root.autoresizingMask = kCAWidthSizable | kCAHeightSizable;

myRealContentLayer = [CALayer layer];
myRealContentLayer.backgroundColor =// whatever color

   [root addSublayer:myRealContentLayer];
   }
   return self;
}


Doing it this way should make your layer immune from the zero size problem.

--Graham


___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread julius

On 8 Aug 2011, at 13:23, Graham Cox wrote:

> 
> On 08/08/2011, at 9:35 PM, julius wrote:
> 
>> When I go and drag the resize handle to make the window as small as I can 
>> make it, i.e. so the window's content rect has zero height then the view 
>> misbehaves, i.e. the top of the view shifts from being some 100 pixels below 
>> the title bar to being 0 pixels below it!
> 
> 
> Ummm, well, that's not what you said was going on originally. This is normal.
Very sorry.
I had tried to be as clear as possible.
Sorry then to have led you this wild goose chase.

> 
> The reason this happens is that once either the width or height goes to 0, 
> there's nothing for the view sizing code to mutliply by to end up with the 
> destination size - once you hit a zero, the sizing information is lost. To 
> prevent this, set a minimum size on the window. This is a good idea in any 
> case - there is no possible use for a zero-sized window.
> 
Of course.
Normal behaviour and understandable.
Bit of a surprise when I came across it but!

thanks again
Julius 

http://juliuspaintings.co.uk



___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread Graham Cox

On 08/08/2011, at 9:35 PM, julius wrote:

> When I go and drag the resize handle to make the window as small as I can 
> make it, i.e. so the window's content rect has zero height then the view 
> misbehaves, i.e. the top of the view shifts from being some 100 pixels below 
> the title bar to being 0 pixels below it!


Ummm, well, that's not what you said was going on originally. This is normal.

The reason this happens is that once either the width or height goes to 0, 
there's nothing for the view sizing code to mutliply by to end up with the 
destination size - once you hit a zero, the sizing information is lost. To 
prevent this, set a minimum size on the window. This is a good idea in any case 
- there is no possible use for a zero-sized window.

--Graham


___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread julius

On 8 Aug 2011, at 11:23, Graham Cox wrote:

> OK, I downloaded the project (tip: always get rid of the build folder before 
> posting a project - it makes the difference between a 5 MB download and one 
> that's only a few K, which on your server, added up to many minutes).
Sorry about that.
Have replaced them.
> 
> Result - it works completely correctly and normally. The view resizes with 
> the window and redraws as expected.
> 
> Whatever the problem you're having is, it's not to do with the code itself. 
> Try doing a clean build and trying again.

Then that is truly a mystery.
I've cleaned and rebuilt.
When I go and drag the resize handle to make the window as small as I can make 
it, i.e. so the window's content rect has zero height then the view misbehaves, 
i.e. the top of the view shifts from being some 100 pixels below the title bar 
to being 0 pixels below it!

Amazing.
Must have done something to my machine then: Mac Pro, OS X 10.6.8  XCode 3.2.6

thanks for your efforts
I was going to put a constraint on window size anyway but now that is essential.
best wishes

Julius  


http://juliuspaintings.co.uk



___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread Graham Cox
OK, I downloaded the project (tip: always get rid of the build folder before 
posting a project - it makes the difference between a 5 MB download and one 
that's only a few K, which on your server, added up to many minutes).

Result - it works completely correctly and normally. The view resizes with the 
window and redraws as expected.

Whatever the problem you're having is, it's not to do with the code itself. Try 
doing a clean build and trying again.



--Graham




On 08/08/2011, at 7:14 PM, julius wrote:

> I went back into IB to check this. As far as I can tell everything is set 
> correctly.
> I have put a copy of the project up here
> http://juliuspaintings.co.uk/cocoa/LayersInView3.zip
> 
> I have also put a copy of the project which contains only the view - no 
> layers here
> http://juliuspaintings.co.uk/cocoa/LayersInView2.zip
> 
> 

___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread julius

On 8 Aug 2011, at 01:46, Graham Cox wrote:

> 
> On 08/08/2011, at 5:52 AM, julius wrote:
> 
>> - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
> 
> 
>  I didn't notice first time through that this is where your code resides 
> (sometimes the most obvious errors pass by when you're looking out for a more 
> subtle error). It's certainly wrong to put it there. A view will typically 
> initialise its layer as part of its own initialisation, i.e. the layer set up 
> should be done in the view's -initWithFrame: method.
I've done as you suggested.
Putting it in initWithRect resulted in no drawing showing up in the window.
I then put it in awakeFromNib and it drew ok but the problem remained as before.
I also did a variant of that by putting the root layer initialisation in the 
initWithRect and the assignment of colour to the layer background in 
awakeFromNib but that did not display anything either. (I only started looking 
at layers this Friday last so am a bit at sea with this technology).

So the program currently looks as follows.
There's nothing in the app delegate except a IBOutlet to the view.
and the view looks like this

//  MyView.m
#import "MyView.h"

@implementation MyView

- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
}
return self;
}

-(void)awakeFromNib {
CALayer * zCALayerRoot = [CALayer layer];
zCALayerRoot.autoresizingMask = kCALayerWidthSizable | 
kCALayerHeightSizable;
zCALayerRoot.needsDisplayOnBoundsChange = YES;
[self setLayer: zCALayerRoot];
[self setWantsLayer:YES];
self.layer.backgroundColor = CGColorCreateGenericRGB(0.0,0.0,1.0,1.0);
} // end awakeFromNib

- (void)drawRect:(NSRect)dirtyRect {
} // end drawRect

@end

> 
>> I get exactly the same behaviour if I leave out all the layer stuff and 
>> instead code the following in the view
>> 
>> - (void)drawRect:(NSRect)dirtyRect {
>>  [[NSColor blackColor]set];
>>  [NSBezierPath fillRect:[self bounds]];
>> } // end drawRect
> 
> Well, in that case the struts (which end up setting the autoresizing mask for 
> the view) must either be set incorrectly,
I went back into IB to check this. As far as I can tell everything is set 
correctly.
I have put a copy of the project up here
http://juliuspaintings.co.uk/cocoa/LayersInView3.zip

I have also put a copy of the project which contains only the view - no layers 
here
http://juliuspaintings.co.uk/cocoa/LayersInView2.zip



> or else the view in IB that you think you're setting is not the view object 
> you actually end up with in  your window. A common mistake is to add the view 
> in IB and also create and add it in code. Do one or the other, never both.
Only created it in IB

Julius


http://juliuspaintings.co.uk



___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-08 Thread julius

On 7 Aug 2011, at 21:30, Kyle Sluder wrote:

> On Sun, Aug 7, 2011 at 1:05 PM, julius  wrote:
>> It is not a problem with the layers.
>> I get exactly the same behaviour if I leave out all the layer stuff and 
>> instead code the following in the view
> 
> Meaning, you still call -setLayer: and -setWantsLayer:, but don't do
> anything else with the layers?
> 
> Or have you removed the layer code from
> -applicationDidFinishLaunching: entirely?
> 
> --Kyle Sluder
Kyle hi
I've removed everything.
The program is as follows

//  LayersInViewAppDelegate.h
#import 
@class MyView;
@interface LayersInViewAppDelegate : NSObject  {
NSWindow *window;
IBOutlet MyView * myViewObj;
}
@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet MyView * myViewObj;
@end

//  LayersInViewAppDelegate.m
#import "LayersInViewAppDelegate.h"
#import "MyView.h"

@implementation LayersInViewAppDelegate
@synthesize window;
@synthesize myViewObj;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
}
@end

//  MyView.h
#import 
@interface MyView : NSView {
}
@end

//  MyView.m
#import "MyView.h"
@implementation MyView

- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}
return self;
}

- (void)drawRect:(NSRect)dirtyRect {
[[NSColor blackColor]set];
[NSBezierPath fillRect:[self bounds]];
} // end drawRect
@end

I've also on occasion made the view a delegate of the window and observed the 
values of the view rect and bounds as the window resizes but the values give no 
clue to what might be happening.
Julius


http://juliuspaintings.co.uk



___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-07 Thread Graham Cox

On 08/08/2011, at 5:52 AM, julius wrote:

> - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {


 I didn't notice first time through that this is where your code resides 
(sometimes the most obvious errors pass by when you're looking out for a more 
subtle error). It's certainly wrong to put it there. A view will typically 
initialise its layer as part of its own initialisation, i.e. the layer set up 
should be done in the view's -initWithFrame: method.

At the time -applicationDidFinishLaunching, the view might exist depending on 
your app architecture, but then again it might not. So moving the code to its 
natural home should be done whether it has a bearing on this problem or not. 
(The issue here isn't just about whether the view exists, it's also about good 
design - the app delegate object has no business fretting about view objects 
that are none of its business).


> I get exactly the same behaviour if I leave out all the layer stuff and 
> instead code the following in the view
> 
> - (void)drawRect:(NSRect)dirtyRect {
>   [[NSColor blackColor]set];
>   [NSBezierPath fillRect:[self bounds]];
> } // end drawRect

Well, in that case the struts (which end up setting the autoresizing mask for 
the view) must either be set incorrectly, or else the view in IB that you think 
you're setting is not the view object you actually end up with in  your window. 
A common mistake is to add the view in IB and also create and add it in code. 
Do one or the other, never both.

--Graham


___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-07 Thread Kyle Sluder
On Sun, Aug 7, 2011 at 1:05 PM, julius  wrote:
> It is not a problem with the layers.
> I get exactly the same behaviour if I leave out all the layer stuff and 
> instead code the following in the view

Meaning, you still call -setLayer: and -setWantsLayer:, but don't do
anything else with the layers?

Or have you removed the layer code from
-applicationDidFinishLaunching: entirely?

--Kyle Sluder
___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-07 Thread julius

On 7 Aug 2011, at 02:31, Graham Cox wrote:

> I think you need to set the resizing mask for the layer as well - since 
> you're creating this yourself, it's your responsibility:
> 
> zCALayerRoot.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
> 
> If you want the layer to redraw its content when it resizes, you also have to 
> set:
> 
> zCALayerRoot.needsDisplayOnBoundsChange = YES;
> 
> but that's not necessary for the background host layer unless it has content 
> other than its background colour to draw.
> 
> --Graham

It is not a problem with the layers.
I get exactly the same behaviour if I leave out all the layer stuff and instead 
code the following in the view

- (void)drawRect:(NSRect)dirtyRect {
[[NSColor blackColor]set];
[NSBezierPath fillRect:[self bounds]];
} // end drawRect

Julius

http://juliuspaintings.co.uk



___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-07 Thread julius
On 7 Aug 2011, at 02:31, Graham Cox wrote:

> I think you need to set the resizing mask for the layer as well - since 
> you're creating this yourself, it's your responsibility:
> 
> zCALayerRoot.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
> 
> If you want the layer to redraw its content when it resizes, you also have to 
> set:
> 
> zCALayerRoot.needsDisplayOnBoundsChange = YES;
> 
> but that's not necessary for the background host layer unless it has content 
> other than its background colour to draw.

Graham hi,
thanks for the suggestion.
Unfortunately I cannot get it to change the original behaviour.

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
CALayer * zCALayerRoot = [CALayer layer];
zCALayerRoot.autoresizingMask = kCALayerWidthSizable | 
kCALayerHeightSizable;
zCALayerRoot.needsDisplayOnBoundsChange = YES;
[self.myViewObj setLayer: zCALayerRoot];
//zCALayerRoot.autoresizingMask = kCALayerWidthSizable | 
kCALayerHeightSizable;
//zCALayerRoot.needsDisplayOnBoundsChange = YES;
[self.myViewObj setWantsLayer:YES];
self.myViewObj.layer.backgroundColor = 
CGColorCreateGenericRGB(0.0,0.0,0.0,1.0);
}

Julius


http://juliuspaintings.co.uk



___

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 arch...@mail-archive.com


Re: resizing window containing NSView with CALayer

2011-08-06 Thread Graham Cox
I think you need to set the resizing mask for the layer as well - since you're 
creating this yourself, it's your responsibility:

zCALayerRoot.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;

If you want the layer to redraw its content when it resizes, you also have to 
set:

zCALayerRoot.needsDisplayOnBoundsChange = YES;

but that's not necessary for the background host layer unless it has content 
other than its background colour to draw.

--Graham




On 07/08/2011, at 1:33 AM, julius wrote:

> Hi,
> is this a system error or I'm doing something wrong?
> 
> In IB place a custom NSView onto a NSWindow and make sure there is a good 
> sized border between the view and the edges of the window.
> 
> In the size pane of the inspector set all the struts and springs so the view 
> will resize with the window.
> 
> This is my drawing code inside the application delegate. 
> myViewObj is an IBOutlet to the custom view which contains no code other than 
> the standard initWithFrame and drawRect templates.
> 
> - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
>   CALayer * zCALayerRoot = [CALayer layer];
>   [self.myViewObj setLayer: zCALayerRoot];
>   [self.myViewObj setWantsLayer:YES];
>   
>   self.myViewObj.layer.backgroundColor = 
> CGColorCreateGenericRGB(0.0,0.0,0.0,1.0);
> }
> 
> When we risize the window by dragging on the resize handle everything works 
> as expected 
> unless we
> 1. resize upwards until the view's rectangle disappears.
> When the window is resized the top of the view will have moved upwards but 
> the lower border is unaffected. 
> 
> 2. resize by moving the rightmost edge  of the window to the right until the 
> view disappears.
> When the window is resized the right hand side of the view will have moved to 
> the right.
> Again the left border is unaffected.

___

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 arch...@mail-archive.com


resizing window containing NSView with CALayer

2011-08-06 Thread julius
Hi,
is this a system error or I'm doing something wrong?

In IB place a custom NSView onto a NSWindow and make sure there is a good sized 
border between the view and the edges of the window.

In the size pane of the inspector set all the struts and springs so the view 
will resize with the window.

This is my drawing code inside the application delegate. 
myViewObj is an IBOutlet to the custom view which contains no code other than 
the standard initWithFrame and drawRect templates.

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
CALayer * zCALayerRoot = [CALayer layer];
[self.myViewObj setLayer: zCALayerRoot];
[self.myViewObj setWantsLayer:YES];

self.myViewObj.layer.backgroundColor = 
CGColorCreateGenericRGB(0.0,0.0,0.0,1.0);
}

When we risize the window by dragging on the resize handle everything works as 
expected 
unless we
1. resize upwards until the view's rectangle disappears.
When the window is resized the top of the view will have moved upwards but the 
lower border is unaffected. 

2. resize by moving the rightmost edge  of the window to the right until the 
view disappears.
When the window is resized the right hand side of the view will have moved to 
the right.
Again the left border is unaffected.

XCode 3.2.6  OSX 10.6.8

Julius

http://juliuspaintings.co.uk



___

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 arch...@mail-archive.com