• 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: How do I hide/show a status bar?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I hide/show a status bar?


  • Subject: Re: How do I hide/show a status bar?
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 06 Aug 2014 07:40:39 -0500

On Aug 5, 2014, at 11:36 PM, Daryle Walker <email@hidden> wrote:

> I’m using the Size Inspector for my document window’s XIB to create a Small Bottom Border as a Content Border.  From the top to the bottom of my window, not counting the title and tool bars, I got:
>
> 1. 20 pts. space w/ Autolayout
> 2. Text-editing (1 line) field, changing its size width-wise as the window does
> 3. 8 pts. space w/ Autolayout
> 4. WebView, changing its size as the window does
> 5. Formerly 0 pts. space, now 22 pts. space, both times with Autolayout
>
> The 22 pts. of space added to the bottom exposes the Small Bottom Border.
>
> I made a menu item to turn on/off the Status Bar.  I even put a check mark there as appropriate.  The problem is that the Bar doesn’t actually disappear, it just looks inactive.  If I try messing with the window’s frame NSRect, I shrink the WebView with the window but keep the Bar.  If I try messing with the WebView’s frame NSRect, the WebView just shifts down and leaves extra space on top.

When you're using auto layout, you should not manipulate view frames directly.  Instead, you modify or replace the constraints.

In your list above, number 5 indicates you have a constraint determining the spacing between the web view and the bottom of the window content view.  So, you want to adjust that.  Presumably, it's of the form contentView.bottom =  webView.bottom * 1 + 22 (or possibly reversed order with a negative constant).  So, you want to adjust that constant term to 0.

You can create an outlet from your controller class to the constraint.  Connect it in the NIB.  Then, you can refer to that constraint in your code and set its "constant" property.

Regards,
Ken


_______________________________________________

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: How do I hide/show a status bar?
      • From: Daryle Walker <email@hidden>
References: 
 >How do I hide/show a status bar? (From: Daryle Walker <email@hidden>)

  • Prev by Date: Re: Talking to other apps - again
  • Next by Date: Re: Talking to other apps - again
  • Previous by thread: How do I hide/show a status bar?
  • Next by thread: Re: How do I hide/show a status bar?
  • Index(es):
    • Date
    • Thread