• 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: j o a r <email@hidden>
  • Date: Fri, 25 Jan 2008 21:09:30 -0800


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:
    • Re: loaded subview not expanding correctly.
      • From: Chris Schmitt <email@hidden>
References: 
 >loaded subview not expanding correctly. (From: Chris Schmitt <email@hidden>)

  • Prev by Date: A Dynamic NSTextField
  • Next by Date: Pushing the truth
  • Previous by thread: Re: loaded subview not expanding correctly.
  • Next by thread: Re: loaded subview not expanding correctly.
  • Index(es):
    • Date
    • Thread