• 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: view problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: view problems


  • Subject: Re: view problems
  • From: Quincey Morris <email@hidden>
  • Date: Sat, 20 Dec 2014 21:26:27 +0000

On Dec 20, 2014, at 13:09 , H Miersch <email@hidden> wrote:
>
>  should i add the constraints to the superview instead of self?

The height and width constraints should be on the view itself.

I’d be more concerned about timing: Did you add constraints before or after layout had occurred, and if after do you need to trigger a re-layout?

Also, your ‘setFrameSize’ method suggests you *might* still be setting the view frame somewhere. You don’t want to do that under auto-layout.

If you’re using Xcode 6, you also have debugging assistance in the view hierarchy display. (It’s a button down near the continue/step controls in the debugger pane.)

You also have -[NSWindow visualizeConstraints:] to help figure out what’s going on.



_______________________________________________

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: 
 >Re: view problems (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: view problems
  • Next by Date: Re: view problems
  • Previous by thread: Re: view problems
  • Next by thread: Re: view problems
  • Index(es):
    • Date
    • Thread