• 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: loaded subview not expanding correctly.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loaded subview not expanding correctly.


  • Subject: Re: loaded subview not expanding correctly.
  • From: Chris Schmitt <email@hidden>
  • Date: Mon, 28 Jan 2008 15:09:45 -0500

Joar, I took your advice and I am still having problems. Here is the output from the command you suggested:

Superview: {{0, 0}, {702, 413}}, New Frame: {{0, 0}, {690, 297}}, Is Inside: 1

I can tell that the view is resizing correctly.. If I stretch out to the right it works, and if I stretch vertically it works. The only thing that is strange is that there seems to be a let margin.. One thing to note is the superview is a panel within the scroll view. Could that make a difference?

Thanks again for your help.

On Jan 26, 2008, at 12:09 AM, j o a r wrote:


On Jan 25, 2008, at 8:19 PM, Chris Schmitt wrote:

My view is loading fine, but my problem is in it's position. The subview is loading into the center of the superview and clipping the right side. I have set the autosizers to take up the whole panel and when I resize the window the subview does look like it is resizing, but there is still a gap on the left hand side.


The view autosizing machinery only works if you have given the subview a correct frame to begin with. I would suggest that you start with verifying that the frame that you assign your subview is what you think it is. You could try something like this:

NSLog(@"Superview: %@, New Frame: %@, Is Inside: %d", NSStringFromRect([[theView superview] bounds]), NSStringFromRect(newFrame), NSContainsRect([[theView superview] bounds], newFrame));

j o a r



_______________________________________________

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:
    • [Solved] Re: loaded subview not expanding correctly.
      • From: Chris Schmitt <email@hidden>
References: 
 >loaded subview not expanding correctly. (From: Chris Schmitt <email@hidden>)
 >Re: loaded subview not expanding correctly. (From: j o a r <email@hidden>)

  • Prev by Date: Re: The mouse is where, again?
  • Next by Date: Serious problems in Interface Builder (bug?). Please help!
  • Previous by thread: Re: loaded subview not expanding correctly.
  • Next by thread: [Solved] Re: loaded subview not expanding correctly.
  • Index(es):
    • Date
    • Thread