I have a 500x500 image.  It's really a 5x5 array of 100x100 image tiles.

I have a 100x100 NSView, imageParentView.

I have a 500x500 NSImageView ("image well" in IB), "imageView" that is a subview of imageParentView and which holds my image.

I'd like to display the 3rd tile in the 2nd row, so it shows through imageParentView.

This code...

    NSRect iviewFrame = [imageView frame];
    iviewFrame.origin.x = 300;
    iviewFrame.origin.y = 200;
    [imageView setFrame:iviewFrame];
NSLog(@"frame origin: %0.1f, %0.1f", [imageView frame].origin.x, [imageView frame].origin.y);

...Didn't do what I had hoped. (As far as I can tell, it moves my parent view off-screen. I'm not 100% sure about that, but the framing- view -- which I assume is imageParentView -- disappears.)

Am I close?  Hints?  Is there a tutorial for this?

Thanks!

_______________________________________________

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

Reply via email to