• 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: iOS 7 navigation bar height
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS 7 navigation bar height


  • Subject: Re: iOS 7 navigation bar height
  • From: Alex Kac <email@hidden>
  • Date: Wed, 16 Apr 2014 21:45:03 -0500

topLayoutGuide is what you want.

https://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/topLayoutGuide

The topLayoutGuide property comes into play when a view controller is frontmost onscreen. It indicates the highest vertical extent for content that you don't want to appear behind a translucent or transparent UIKit bar (such as a status or navigation bar). This property implements the UILayoutSupport protocol and you can employ it as a constraint item when using the NSLayoutConstraint class.

The value of this property is, specifically, the value of the length property of the object returned when you query this property. This value is constrained by either the view controller or by its enclosing container view controller (such as a navigation or tab bar controller), as follows:

	• A view controller not within a container view controller constrains this property to indicate the bottom of the status bar, if visible, or else to indicate the top edge of the view controller's view.
	• A view controller within a container view controller does not set this property's value. Instead, the container view controller constrains the value to indicate:
		• The bottom of the navigation bar, if a navigation bar is visible
		• The bottom of the status bar, if only a status bar is visible
		• The top edge of the view controller’s view, if neither a status bar nor navigation bar is visible
If a container navigation controller’s navigation bar is visible and opaque, the navigation controller lays out the frontmost view controller’s view so its top edge abuts the bottom of the navigation bar. In this case, the value of this property is 0.

Query this property within your implementation of the viewDidLayoutSubviews method.


On Apr 16, 2014, at 8:30 PM, ico <email@hidden> wrote:

>   1.
>
>   UINavigationController will alter the height of its UINavigationBar to
> --
>
> My problem is, I have a UITabBarController with 3 tabs, and each tabs is a

Alex Kac - President and Founder
Web Information Solutions, Inc.

"Champions aren't made in the gyms. Champions are made from something they have deep inside of them - a desire, a dream, a vision. They have last-minute stamina, they have to be a little faster, they have to have the skill, and the will. But the will must be stronger than the skill."
-- Muhammad Ali






_______________________________________________

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: iOS 7 navigation bar height
      • From: ico <email@hidden>
References: 
 >iOS 7 navigation bar height (From: ico <email@hidden>)

  • Prev by Date: iOS 7 navigation bar height
  • Next by Date: Re: iOS 7 navigation bar height
  • Previous by thread: iOS 7 navigation bar height
  • Next by thread: Re: iOS 7 navigation bar height
  • Index(es):
    • Date
    • Thread