On 7 Aug 2011, at 21:30, Kyle Sluder wrote:
> On Sun, Aug 7, 2011 at 1:05 PM, julius <[email protected]> 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 <Cocoa/Cocoa.h>
@class MyView;
@interface LayersInViewAppDelegate : NSObject <NSApplicationDelegate> {
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 <Cocoa/Cocoa.h>
@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 ([email protected])
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]