• 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
Displaying an offset image.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Displaying an offset image.


  • Subject: Displaying an offset image.
  • From: Mac First <email@hidden>
  • Date: Thu, 11 Jun 2009 17:32:04 -0700

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 (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


  • Follow-Ups:
    • Re: Displaying an offset image. (Partial fix)
      • From: Mac First <email@hidden>
  • Prev by Date: Re: Passing References During Initialization / Nib Loading
  • Next by Date: Re: trimbox and bleedbox from PDF
  • Previous by thread: Re: UTI not identified correctly for some users.
  • Next by thread: Re: Displaying an offset image. (Partial fix)
  • Index(es):
    • Date
    • Thread