• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: resizing window containing NSView with CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resizing window containing NSView with CALayer


  • Subject: Re: resizing window containing NSView with CALayer
  • From: julius <email@hidden>
  • Date: Mon, 08 Aug 2011 09:34:18 +0100

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

> On Sun, Aug 7, 2011 at 1:05 PM, julius <email@hidden> 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@hidden)

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:

This email sent to email@hidden

References: 
 >resizing window containing NSView with CALayer (From: julius <email@hidden>)
 >Re: resizing window containing NSView with CALayer (From: Graham Cox <email@hidden>)
 >Re: resizing window containing NSView with CALayer (From: julius <email@hidden>)
 >Re: resizing window containing NSView with CALayer (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Coordinate system in CAOpenGLLayer
  • Next by Date: Re: Asynchronous downloading and parsing of XML
  • Previous by thread: Re: resizing window containing NSView with CALayer
  • Next by thread: Referencing an object after sending a release message to it
  • Index(es):
    • Date
    • Thread